Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r871cdb4 re149f77  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug  8 11:54:00 2017
    13 // Update Count     : 44
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Sep  3 19:23:46 2017
     13// Update Count     : 48
    1414//
     15
    1516#pragma once
    1617
     
    2425#include "Constant.h"             // for Constant
    2526#include "Initializer.h"          // for Designation (ptr only), Initializer
     27#include "Label.h"                // for Label
    2628#include "Mutator.h"              // for Mutator
    2729#include "SynTree.h"              // for UniqueId
     
    171173};
    172174
    173 // xxx - this doesn't appear to actually be hooked in anywhere. We should use this instead of the "&&"" UntypedExpr hack
     175// GCC &&label
     176// https://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/Labels-as-Values.html
    174177class LabelAddressExpr : public Expression {
    175178  public:
    176         Expression * arg;
    177 
    178         LabelAddressExpr( Expression * arg );
     179        Label arg;
     180
     181        LabelAddressExpr( const Label &arg );
    179182        LabelAddressExpr( const LabelAddressExpr & other );
    180183        virtual ~LabelAddressExpr();
    181 
    182         Expression * get_arg() const { return arg; }
    183         void set_arg(Expression * newValue ) { arg = newValue; }
    184184
    185185        virtual LabelAddressExpr * clone() const { return new LabelAddressExpr( * this ); }
     
    538538  public:
    539539        Expression * inout;
    540         ConstantExpr * constraint;
     540        Expression * constraint;
    541541        Expression * operand;
    542542
    543         AsmExpr( Expression * inout, ConstantExpr * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
     543        AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
    544544        AsmExpr( const AsmExpr & other );
    545545        virtual ~AsmExpr() { delete inout; delete constraint; delete operand; };
     
    548548        void set_inout( Expression * newValue ) { inout = newValue; }
    549549
    550         ConstantExpr * get_constraint() const { return constraint; }
    551         void set_constraint( ConstantExpr * newValue ) { constraint = newValue; }
     550        Expression * get_constraint() const { return constraint; }
     551        void set_constraint( Expression * newValue ) { constraint = newValue; }
    552552
    553553        Expression * get_operand() const { return operand; }
     
    821821};
    822822
    823 
    824 std::ostream & operator<<( std::ostream & out, const Expression * expr );
    825 
    826823// Local Variables: //
    827824// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.