Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r96f9ef5 re3e16bc  
    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 : Mon Aug 14 10:15:00 2017
    13 // Update Count     : 128
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Sep  3 19:24:06 2017
     13// Update Count     : 131
    1414//
    1515
     
    8282        int scopeLevel = 0;
    8383
    84         ConstantExpr *asmName;
     84        Expression *asmName;
    8585        std::list< Attribute * > attributes;
    8686
     
    9797        DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; }
    9898
    99         ConstantExpr *get_asmName() const { return asmName; }
    100         DeclarationWithType * set_asmName( ConstantExpr *newValue ) { asmName = newValue; return this; }
     99        Expression *get_asmName() const { return asmName; }
     100        DeclarationWithType * set_asmName( Expression *newValue ) { asmName = newValue; return this; }
    101101
    102102        std::list< Attribute * >& get_attributes() { return attributes; }
     
    137137        void set_bitfieldWidth( Expression *newValue ) { bitfieldWidth = newValue; }
    138138
    139         static ObjectDecl * newObject( const std::string & name, Type * type, Initializer * init );
    140 
    141139        virtual ObjectDecl *clone() const { return new ObjectDecl( *this ); }
    142140        virtual void accept( Visitor &v ) { v.visit( this ); }
     
    157155        virtual ~FunctionDecl();
    158156
    159         Type * get_type() const;
    160         virtual void set_type(Type *);
     157        Type * get_type() const { return type; }
     158        virtual void set_type(Type * t) { type = strict_dynamic_cast< FunctionType* >( t ); }
    161159
    162160        FunctionType * get_functionType() const { return type; }
     
    232230        virtual TypeDecl *clone() const { return new TypeDecl( *this ); }
    233231        virtual void accept( Visitor &v ) { v.visit( this ); }
    234         virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     232        virtual TypeDecl *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    235233        virtual void print( std::ostream &os, int indent = 0 ) const;
    236234
Note: See TracChangeset for help on using the changeset viewer.