Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r4040425 r03e5d14  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Declaration.h -- 
     7// Declaration.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:28:11 2016
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri May 06 15:39:02 2016
    1313// Update Count     : 33
    1414//
     
    106106        typedef DeclarationWithType Parent;
    107107  public:
    108         FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn );
     108        // temporary - merge this into general GCC attributes
     109        struct Attribute {
     110                enum Type {
     111                        NoAttribute, Constructor, Destructor,
     112                } type;
     113                enum Priority {
     114                        // priorities 0-100 are reserved by gcc, so it's okay to use 100 an exceptional case
     115                        Default = 100, High,
     116                } priority;
     117                Attribute(Type t = NoAttribute, Priority p = Default) : type(t), priority(p) {};
     118        };
     119
     120        FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, Attribute attribute = Attribute() );
    109121        FunctionDecl( const FunctionDecl &other );
    110122        virtual ~FunctionDecl();
     
    119131        std::list< std::string >& get_oldIdents() { return oldIdents; }
    120132        std::list< Declaration* >& get_oldDecls() { return oldDecls; }
     133        Attribute get_attribute() const { return attribute; }
     134        void set_attribute( Attribute newValue ) { attribute = newValue; }
    121135
    122136        virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); }
     
    130144        std::list< std::string > oldIdents;
    131145        std::list< Declaration* > oldDecls;
     146        Attribute attribute;
    132147};
    133148
Note: See TracChangeset for help on using the changeset viewer.