Changeset c829320


Ignore:
Timestamp:
Jun 19, 2019, 11:50:30 AM (2 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
3fc0f2a
Parents:
73edfe9
Message:

Hoist attributes back up to Type in new AST

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Type.hpp

    r73edfe9 rc829320  
    3737public:
    3838        CV::Qualifiers qualifiers;
    39 
    40         Type( CV::Qualifiers q = {} ) : qualifiers(q) {}
     39        std::vector<ptr<Attribute>> attributes;
     40
     41        Type( CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} )
     42        : qualifiers(q), attributes(std::move(as)) {}
    4143
    4244        bool is_const() const { return qualifiers.is_const; }
     
    268270        ForallList forall;
    269271
    270         ParameterizedType( ForallList&& fs = {}, CV::Qualifiers q = {} )
    271         : Type(q), forall(std::move(fs)) {}
    272         ParameterizedType( CV::Qualifiers q ) : Type(q), forall() {}
     272        ParameterizedType( ForallList&& fs = {}, CV::Qualifiers q = {},
     273                std::vector<ptr<Attribute>> && as = {} )
     274        : Type(q, std::move(as)), forall(std::move(fs)) {}
     275       
     276        ParameterizedType( CV::Qualifiers q, std::vector<ptr<Attribute>> && as = {} )
     277        : Type(q, std::move(as)), forall() {}
    273278
    274279private:
     
    311316public:
    312317        std::vector<ptr<Expr>> params;
    313         std::vector<ptr<Attribute>> attributes;
    314318        std::string name;
    315319        bool hoistType = false;
     
    317321        ReferenceToType( const std::string& n, CV::Qualifiers q = {},
    318322                std::vector<ptr<Attribute>> && as = {} )
    319         : ParameterizedType(q), params(), attributes(std::move(as)), name(n) {}
     323        : ParameterizedType(q, std::move(as)), params(), name(n) {}
    320324
    321325        /// Gets aggregate declaration this type refers to
Note: See TracChangeset for help on using the changeset viewer.