Changeset 8b11840 for src/SymTab/FixFunction.cc
- Timestamp:
- Sep 22, 2017, 1:50:00 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- b56c17c
- Parents:
- 05807e9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/FixFunction.cc
r05807e9 r8b11840 27 27 28 28 DeclarationWithType * FixFunction::mutate(FunctionDecl *functionDecl) { 29 // can't delete function type because it may contain assertions, so transfer ownership to new object 29 30 ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type() ), 0, functionDecl->get_attributes() ); 30 31 functionDecl->get_attributes().clear(); 31 // can't delete function type because it may contain assertions, but can't transfer ownership without a clone since set_type checks for nullptr 32 functionDecl->set_type( functionDecl->get_type()->clone() ); 32 functionDecl->type = nullptr; 33 33 delete functionDecl; 34 34 return pointer;
Note: See TracChangeset
for help on using the changeset viewer.