Ignore:
Timestamp:
Sep 1, 2017, 6:59:48 PM (4 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:
b0dfbc4
Parents:
bc3127d
Message:

Fix handling of GCC label address and computed goto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rbc3127d r5809461  
    546546                extension( addressExpr );
    547547                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 );
    554549                output << ")";
     550        }
     551
     552        void CodeGenerator::visit( LabelAddressExpr *addressExpr ) {
     553                extension( addressExpr );
     554                output << "(&&" << addressExpr->arg << ")";
    555555        }
    556556
Note: See TracChangeset for help on using the changeset viewer.