Changeset ab8c6a6 for src/GenPoly
- Timestamp:
- Oct 26, 2020, 12:17:28 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 342be43
- Parents:
- 912cc7d7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Specialize.cc
r912cc7d7 rab8c6a6 321 321 } 322 322 323 // Fold it into Specialize if we find a good way. 324 struct StaticThunks final : public WithShortCircuiting { 325 void previsit( Declaration * ) { 326 visit_children = false; 327 } 328 void postvisit( FunctionDecl * decl ) { 329 if ( isPrefix( decl->name, "_thunk" ) ) { 330 decl->storageClasses.is_static = true; 331 } 332 } 333 }; 334 323 335 void convertSpecializations( std::list< Declaration* >& translationUnit ) { 324 336 PassVisitor<Specialize> spec; 325 337 mutateAll( translationUnit, spec ); 338 PassVisitor<StaticThunks> staticThunks; 339 acceptAll( translationUnit, staticThunks ); 326 340 } 327 341 } // namespace GenPoly
Note: See TracChangeset
for help on using the changeset viewer.