ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since c6976ba was
8ca3a72,
checked in by Rob Schluntz <rschlunt@…>, 7 years ago
|
remove redundant noLabels variables
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[db175c8] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
| 7 | // Declaration.h -- |
---|
| 8 | // |
---|
| 9 | // Author : Richard C. Bilson |
---|
| 10 | // Created On : Mon May 18 07:44:20 2015 |
---|
[44a81853] | 11 | // Last Modified By : Peter A. Buhr |
---|
| 12 | // Last Modified On : Wed Jan 18 16:27:11 2017 |
---|
| 13 | // Update Count : 38 |
---|
[db175c8] | 14 | // |
---|
| 15 | |
---|
| 16 | #ifndef GCC_ATTRIBUTE_H |
---|
| 17 | #define GCC_ATTRIBUTE_H |
---|
| 18 | |
---|
| 19 | #include "SynTree.h" |
---|
| 20 | |
---|
| 21 | // GCC attribute |
---|
[a436947] | 22 | // https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Attribute-Syntax.html#Attribute-Syntax |
---|
[db175c8] | 23 | class Attribute { |
---|
| 24 | public: |
---|
[44a81853] | 25 | Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {} |
---|
| 26 | Attribute( const Attribute &other ); |
---|
| 27 | virtual ~Attribute(); |
---|
[db175c8] | 28 | |
---|
[44a81853] | 29 | std::string get_name() const { return name; } |
---|
| 30 | void set_name( const std::string & newValue ) { name = newValue; } |
---|
| 31 | std::list< Expression * > & get_parameters() { return parameters; } |
---|
| 32 | bool empty() const { return name == ""; } |
---|
[db175c8] | 33 | |
---|
[44a81853] | 34 | Attribute * clone() const { return new Attribute( *this ); } |
---|
| 35 | void print( std:: ostream &os, int indent = 0 ) const; |
---|
[db175c8] | 36 | private: |
---|
[44a81853] | 37 | std::string name; |
---|
| 38 | // to keep things nice and tight, use NameExpr for special identifier parameters |
---|
| 39 | std::list< Expression * > parameters; |
---|
[db175c8] | 40 | }; |
---|
| 41 | |
---|
[8ca3a72] | 42 | const std::list< Attribute * > noAttributes; |
---|
| 43 | |
---|
[db175c8] | 44 | #endif |
---|
[44a81853] | 45 | |
---|
| 46 | // Local Variables: // |
---|
| 47 | // tab-width: 4 // |
---|
| 48 | // mode: c++ // |
---|
| 49 | // compile-command: "make install" // |
---|
| 50 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.