- Timestamp:
- Oct 8, 2023, 10:31:26 AM (15 months ago)
- Branches:
- master
- Children:
- 4817662
- Parents:
- be8ee65
- Location:
- src
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rbe8ee65 rd3652df 1157 1157 1158 1158 void CodeGenerator::postvisit( WithStmt * with ) { 1159 if ( ! options.genC ) {1160 output << "with ( "; 1161 genCommaList( with->exprs.begin(), with->exprs.end() );1162 output << " ) ";1163 }1159 assertf( ! options.genC, "WithStmts should not reach code generation." ); 1160 1161 output << "with ( "; 1162 genCommaList( with->exprs.begin(), with->exprs.end() ); 1163 output << " ) "; 1164 1164 with->stmt->accept( *visitor ); 1165 1165 } -
src/GenPoly/BoxNew.cpp
rbe8ee65 rd3652df 1726 1726 1727 1727 // -------------------------------------------------------------------------- 1728 // TODO: This is kind of a blind test. I believe all withExprs are handled1729 // in the resolver and we could clear them out after that.1730 struct RemoveWithExprs final {1731 ast::FunctionDecl const * postvisit( ast::FunctionDecl const * decl ) {1732 if ( decl->withExprs.empty() ) return decl;1733 auto mutDecl = mutate( decl );1734 mutDecl->withExprs.clear();1735 return mutDecl;1736 }1737 };1738 1739 // --------------------------------------------------------------------------1740 1728 /// Inserts code to access polymorphic layout inforation. 1741 1729 /// * Replaces member and size/alignment/offsetof expressions on polymorphic … … 2511 2499 ast::Pass<DeclAdapter>::run( translationUnit ); 2512 2500 ast::Pass<RewireAdapters>::run( translationUnit ); 2513 ast::Pass<RemoveWithExprs>::run( translationUnit );2514 2501 ast::Pass<PolyGenericCalculator>::run( translationUnit ); 2515 2502 ast::Pass<Eraser>::run( translationUnit ); -
src/ResolvExpr/module.mk
rbe8ee65 rd3652df 72 72 ResolvExpr/AlternativePrinter.h \ 73 73 ResolvExpr/CandidatePrinter.cpp \ 74 ResolvExpr/CandidatePrinter.hpp 74 ResolvExpr/CandidatePrinter.hpp \ 75 ResolvExpr/EraseWith.cpp \ 76 ResolvExpr/EraseWith.hpp 75 77 76 78 SRCDEMANGLE += $(SRC_RESOLVEXPR) -
src/main.cc
rbe8ee65 rd3652df 62 62 #include "Parser/RunParser.hpp" // for buildList, dumpParseTree,... 63 63 #include "ResolvExpr/CandidatePrinter.hpp" // for printCandidates 64 #include "ResolvExpr/EraseWith.hpp" // for eraseWith 64 65 #include "ResolvExpr/Resolver.h" // for resolve 65 66 #include "SynTree/LinkageSpec.h" // for Spec, Cforall, Intrinsic … … 396 397 397 398 PASS( "Fix Init", InitTweak::fix, transUnit, buildingLibrary() ); 399 PASS( "Erase With", ResolvExpr::eraseWith, transUnit ); 398 400 399 401 // fix ObjectDecl - replaces ConstructorInit nodes
Note: See TracChangeset
for help on using the changeset viewer.