Changeset 44b4114 for src/CodeGen
- Timestamp:
- Feb 14, 2018, 4:18:37 PM (6 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:
- f5883bd
- Parents:
- 490ff5c3
- git-author:
- Rob Schluntz <rschlunt@…> (02/14/18 16:17:36)
- git-committer:
- Rob Schluntz <rschlunt@…> (02/14/18 16:18:37)
- Location:
- src/CodeGen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r490ff5c3 r44b4114 764 764 765 765 void CodeGenerator::postvisit( StmtExpr * stmtExpr ) { 766 std::list< Statement * > & stmts = stmtExpr-> get_statements()->get_kids();766 std::list< Statement * > & stmts = stmtExpr->statements->kids; 767 767 output << "({" << endl; 768 768 ++indent; … … 775 775 // cannot cast to void, otherwise the expression statement has no value 776 776 if ( ExprStmt * exprStmt = dynamic_cast< ExprStmt * >( stmt ) ) { 777 exprStmt-> get_expr()->accept( *visitor );777 exprStmt->expr->accept( *visitor ); 778 778 output << ";" << endl; 779 779 ++i; … … 795 795 assertf( ! genC, "Unique expressions should not reach code generation." ); 796 796 expr->callExpr->accept( *visitor ); 797 } 798 799 void CodeGenerator::postvisit( DeletedExpr * expr ) { 800 assertf( ! genC, "Deleted expressions should not reach code generation." ); 801 expr->expr->accept( *visitor ); 797 802 } 798 803 -
src/CodeGen/CodeGenerator.h
r490ff5c3 r44b4114 88 88 void postvisit( StmtExpr * ); 89 89 void postvisit( ConstructorExpr * ); 90 void postvisit( DeletedExpr * ); 90 91 91 92 //*** Statements
Note: See TracChangeset
for help on using the changeset viewer.