Changeset 4e7f0f1 for src/SymTab/Autogen.cc
- Timestamp:
- Sep 7, 2016, 11:40:52 AM (8 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:
- 3b58d91
- Parents:
- e76acbe (diff), 02cea2d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
re76acbe r4e7f0f1 280 280 } 281 281 282 void addForwardDecl( FunctionDecl * functionDecl, std::list< Declaration * > & declsToAdd ) { 283 FunctionDecl * decl = functionDecl->clone(); 284 delete decl->get_statements(); 285 decl->set_statements( NULL ); 286 declsToAdd.push_back( decl ); 287 decl->fixUniqueId(); 288 } 289 282 290 void makeStructFunctions( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd ) { 283 291 FunctionType *assignType = new FunctionType( Type::Qualifiers(), false ); … … 324 332 copyCtorDecl->fixUniqueId(); 325 333 dtorDecl->fixUniqueId(); 334 335 if ( functionNesting == 0 ) { 336 // forward declare if top-level struct, so that 337 // type is complete as soon as its body ends 338 addForwardDecl( assignDecl, declsToAdd ); 339 addForwardDecl( ctorDecl, declsToAdd ); 340 addForwardDecl( copyCtorDecl, declsToAdd ); 341 addForwardDecl( dtorDecl, declsToAdd ); 342 } 326 343 327 344 // create constructors which take each member type as a parameter.
Note: See TracChangeset
for help on using the changeset viewer.