Changes in / [4817662:8bc67cf]
- Location:
- src
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r4817662 r8bc67cf 1157 1157 1158 1158 void CodeGenerator::postvisit( WithStmt * with ) { 1159 assertf( ! options.genC, "WithStmts should not reach code generation." );1160 1161 output << "with ( ";1162 genCommaList( with->exprs.begin(), with->exprs.end() );1163 output << " ) ";1159 if ( ! options.genC ) { 1160 output << "with ( "; 1161 genCommaList( with->exprs.begin(), with->exprs.end() ); 1162 output << " ) "; 1163 } 1164 1164 with->stmt->accept( *visitor ); 1165 1165 } -
src/GenPoly/BoxNew.cpp
r4817662 r8bc67cf 1726 1726 1727 1727 // -------------------------------------------------------------------------- 1728 // TODO: This is kind of a blind test. I believe all withExprs are handled 1729 // 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 // -------------------------------------------------------------------------- 1728 1740 /// Inserts code to access polymorphic layout inforation. 1729 1741 /// * Replaces member and size/alignment/offsetof expressions on polymorphic … … 2499 2511 ast::Pass<DeclAdapter>::run( translationUnit ); 2500 2512 ast::Pass<RewireAdapters>::run( translationUnit ); 2513 ast::Pass<RemoveWithExprs>::run( translationUnit ); 2501 2514 ast::Pass<PolyGenericCalculator>::run( translationUnit ); 2502 2515 ast::Pass<Eraser>::run( translationUnit ); -
src/ResolvExpr/module.mk
r4817662 r8bc67cf 72 72 ResolvExpr/AlternativePrinter.h \ 73 73 ResolvExpr/CandidatePrinter.cpp \ 74 ResolvExpr/CandidatePrinter.hpp \ 75 ResolvExpr/EraseWith.cpp \ 76 ResolvExpr/EraseWith.hpp 74 ResolvExpr/CandidatePrinter.hpp 77 75 78 76 SRCDEMANGLE += $(SRC_RESOLVEXPR) -
src/main.cc
r4817662 r8bc67cf 62 62 #include "Parser/RunParser.hpp" // for buildList, dumpParseTree,... 63 63 #include "ResolvExpr/CandidatePrinter.hpp" // for printCandidates 64 #include "ResolvExpr/EraseWith.hpp" // for eraseWith65 64 #include "ResolvExpr/Resolver.h" // for resolve 66 65 #include "SynTree/LinkageSpec.h" // for Spec, Cforall, Intrinsic … … 397 396 398 397 PASS( "Fix Init", InitTweak::fix, transUnit, buildingLibrary() ); 399 PASS( "Erase With", ResolvExpr::eraseWith, transUnit );400 398 401 399 // fix ObjectDecl - replaces ConstructorInit nodes
Note: See TracChangeset
for help on using the changeset viewer.