Changeset 5809461 for src/CodeGen
- Timestamp:
- Sep 1, 2017, 6:59:48 PM (7 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:
- b0dfbc4
- Parents:
- bc3127d
- Location:
- src/CodeGen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rbc3127d r5809461 546 546 extension( addressExpr ); 547 547 output << "(&"; 548 // this hack makes sure that we don't convert "constant_zero" to "0" if we're taking its address 549 if ( VariableExpr * variableExpr = dynamic_cast< VariableExpr* >( addressExpr->get_arg() ) ) { 550 output << mangleName( variableExpr->get_var() ); 551 } else { 552 addressExpr->get_arg()->accept( *this ); 553 } // if 548 addressExpr->arg->accept( *this ); 554 549 output << ")"; 550 } 551 552 void CodeGenerator::visit( LabelAddressExpr *addressExpr ) { 553 extension( addressExpr ); 554 output << "(&&" << addressExpr->arg << ")"; 555 555 } 556 556 -
src/CodeGen/CodeGenerator.h
rbc3127d r5809461 59 59 virtual void visit( NameExpr *nameExpr ); 60 60 virtual void visit( AddressExpr *addressExpr ); 61 virtual void visit( LabelAddressExpr *addressExpr ); 61 62 virtual void visit( CastExpr *castExpr ); 62 63 virtual void visit( VirtualCastExpr *castExpr ); -
src/CodeGen/OperatorTable.cc
rbc3127d r5809461 66 66 { "?^=?", "^=", "_operator_bitxorassign", OT_INFIXASSIGN }, 67 67 { "?|=?", "|=", "_operator_bitorassign", OT_INFIXASSIGN }, 68 { "&&", "&&", "&&", OT_LABELADDRESS }69 68 }; 70 69
Note: See TracChangeset
for help on using the changeset viewer.