Ignore:
Timestamp:
May 5, 2017, 11:05:12 AM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
45a4ea7
Parents:
bdd0755
Message:

add version of CodeGen::generate for a single node for use in gdb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rbdd0755 r262f085  
    772772        void CodeGenerator::visit( ExprStmt * exprStmt ) {
    773773                assert( exprStmt );
    774                 // cast the top-level expression to void to reduce gcc warnings.
    775                 Expression * expr = new CastExpr( exprStmt->get_expr() );
     774                Expression * expr = exprStmt->get_expr();
     775                if ( genC ) {
     776                        // cast the top-level expression to void to reduce gcc warnings.
     777                        expr = new CastExpr( expr );
     778                }
    776779                expr->accept( *this );
    777780                output << ";";
Note: See TracChangeset for help on using the changeset viewer.