Changeset ac9ca96 for src/InitTweak
- Timestamp:
- Oct 13, 2016, 11:19:23 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:
- 7756647
- Parents:
- 65660bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/GenInit.cc
r65660bd rac9ca96 238 238 239 239 bool CtorDtor::isManaged( Type * type ) const { 240 if ( TupleType * tupleType = dynamic_cast< TupleType * > ( type ) ) { 241 // tuple is also managed if any of its components are managed 242 if ( std::any_of( tupleType->get_types().begin(), tupleType->get_types().end(), [&](Type * type) { return isManaged( type ); }) ) { 243 return true; 244 } 245 } 240 246 return managedTypes.find( SymTab::Mangler::mangle( type ) ) != managedTypes.end(); 241 247 } … … 245 251 while ( ArrayType * at = dynamic_cast< ArrayType * >( type ) ) { 246 252 type = at->get_base(); 247 }248 if ( TupleType * tupleType = dynamic_cast< TupleType * > ( type ) ) {249 return std::any_of( tupleType->get_types().begin(), tupleType->get_types().end(), [&](Type * type) { return isManaged( type ); });250 253 } 251 254 return isManaged( type );
Note: See TracChangeset
for help on using the changeset viewer.