Changeset dbc733e for src/CodeGen


Ignore:
Timestamp:
Sep 1, 2017, 9:53:19 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
f43df73
Parents:
ba2a68b (diff), b0dfbc4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Location:
src/CodeGen
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rba2a68b rdbc733e  
    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
  • src/CodeGen/CodeGenerator.h

    rba2a68b rdbc733e  
    5959                virtual void visit( NameExpr *nameExpr );
    6060                virtual void visit( AddressExpr *addressExpr );
     61                virtual void visit( LabelAddressExpr *addressExpr );
    6162                virtual void visit( CastExpr *castExpr );
    6263                virtual void visit( VirtualCastExpr *castExpr );
  • src/CodeGen/OperatorTable.cc

    rba2a68b rdbc733e  
    6666                        {       "?^=?",         "^=",   "_operator_bitxorassign",               OT_INFIXASSIGN          },
    6767                        {       "?|=?",         "|=",   "_operator_bitorassign",                OT_INFIXASSIGN          },
    68                         {       "&&",           "&&",   "&&",                                                   OT_LABELADDRESS         }
    6968                };
    7069
Note: See TracChangeset for help on using the changeset viewer.