Changeset 6d160d7 for src/GenPoly
- Timestamp:
- Jan 22, 2016, 2:21:29 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 8488c715
- Parents:
- 32805db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/ScrubTyVars.cc
r32805db r6d160d7 82 82 83 83 Type * ScrubTyVars::mutate( PointerType *pointer ) { 84 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( pointer->get_base() ) ) { 85 if ( tyVars.find( typeInst->get_name() ) != tyVars.end() ) { 86 Type *ret = mutate( typeInst ); 87 ret->get_qualifiers() += pointer->get_qualifiers(); 88 pointer->set_base( 0 ); 89 delete pointer; 90 return ret; 91 } // if 92 } // if 84 if ( Type *polyType = isPolyType( pointer->get_base(), tyVars ) ) { 85 Type *ret = polyType->acceptMutator( *this ); 86 ret->get_qualifiers() += pointer->get_qualifiers(); 87 pointer->set_base( 0 ); 88 delete pointer; 89 return ret; 90 } 93 91 return Mutator::mutate( pointer ); 94 92 }
Note: See TracChangeset
for help on using the changeset viewer.