Changeset c7a3081 for src/GenPoly/InstantiateGeneric.cc
- Timestamp:
- May 18, 2017, 4:58:08 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:
- 8905f56
- Parents:
- 02153feb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/InstantiateGeneric.cc
r02153feb rc7a3081 367 367 concDecl->set_body( inst->get_baseStruct()->has_body() ); 368 368 substituteMembers( inst->get_baseStruct()->get_members(), *inst->get_baseParameters(), typeSubs, concDecl->get_members() ); 369 DeclMutator::addDeclaration( concDecl ); 370 insert( inst, typeSubs, concDecl ); 369 insert( inst, typeSubs, concDecl ); // must insert before recursion 371 370 concDecl->acceptMutator( *this ); // recursively instantiate members 371 DeclMutator::addDeclaration( concDecl ); // must occur before declaration is added so that member instantiations appear first 372 372 } 373 373 StructInstType *newInst = new StructInstType( inst->get_qualifiers(), concDecl->get_name() ); … … 422 422 concDecl->set_body( inst->get_baseUnion()->has_body() ); 423 423 substituteMembers( inst->get_baseUnion()->get_members(), *inst->get_baseParameters(), typeSubs, concDecl->get_members() ); 424 DeclMutator::addDeclaration( concDecl ); 425 insert( inst, typeSubs, concDecl ); 424 insert( inst, typeSubs, concDecl ); // must insert before recursion 426 425 concDecl->acceptMutator( *this ); // recursively instantiate members 426 DeclMutator::addDeclaration( concDecl ); // must occur before declaration is added so that member instantiations appear first 427 427 } 428 428 UnionInstType *newInst = new UnionInstType( inst->get_qualifiers(), concDecl->get_name() );
Note: See TracChangeset
for help on using the changeset viewer.