Changeset a465caf for src/InitTweak/InitTweak.cc
- Timestamp:
- Aug 8, 2016, 4:20:29 PM (7 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, ctor, 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:
- 0853178
- Parents:
- 242d458
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r242d458 ra465caf 291 291 } 292 292 293 namespace { 294 template <typename Predicate> 295 bool allofCtorDtor( Statement * stmt, const Predicate & pred ) { 296 std::list< Expression * > callExprs; 297 collectCtorDtorCalls( stmt, callExprs ); 298 // if ( callExprs.empty() ) return false; // xxx - do I still need this check? 299 return std::all_of( callExprs.begin(), callExprs.end(), pred); 300 } 301 } 302 293 303 bool isIntrinsicSingleArgCallStmt( Statement * stmt ) { 294 std::list< Expression * > callExprs; 295 collectCtorDtorCalls( stmt, callExprs ); 296 // if ( callExprs.empty() ) return false; // xxx - do I still need this check? 297 return std::all_of( callExprs.begin(), callExprs.end(), []( Expression * callExpr ){ 304 return allofCtorDtor( stmt, []( Expression * callExpr ){ 298 305 if ( ApplicationExpr * appExpr = isIntrinsicCallExpr( callExpr ) ) { 299 306 assert( ! appExpr->get_function()->get_results().empty() ); … … 303 310 } 304 311 return false; 312 }); 313 } 314 315 bool isIntrinsicCallStmt( Statement * stmt ) { 316 return allofCtorDtor( stmt, []( Expression * callExpr ) { 317 return isIntrinsicCallExpr( callExpr ); 305 318 }); 306 319 }
Note: See TracChangeset
for help on using the changeset viewer.