Changes in src/SynTree/Declaration.h [7baed7d:4040425]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r7baed7d r4040425 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Declaration.h -- 7 // Declaration.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 06 16:26:12201611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 17:28:11 2016 13 13 // Update Count : 33 14 14 // … … 22 22 #include "Parser/LinkageSpec.h" 23 23 #include "Parser/ParseNode.h" 24 #include <string>25 24 26 25 class Declaration { … … 68 67 void set_mangleName( std::string newValue ) { mangleName = newValue; } 69 68 70 std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }71 72 int get_scopeLevel() const { return scopeLevel; }73 void set_scopeLevel( int newValue ) { scopeLevel = newValue; }74 75 69 virtual DeclarationWithType *clone() const = 0; 76 70 virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0; … … 81 75 // this represents the type with all types and typedefs expanded it is generated by SymTab::Validate::Pass2 82 76 std::string mangleName; 83 // need to remember the scope level at which the variable was declared, so that84 // shadowed identifiers can be accessed85 int scopeLevel = 0;86 77 }; 87 78 … … 115 106 typedef DeclarationWithType Parent; 116 107 public: 117 FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn , const std::list< Attribute * > attributes = std::list< Attribute * >());108 FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn ); 118 109 FunctionDecl( const FunctionDecl &other ); 119 110 virtual ~FunctionDecl(); … … 128 119 std::list< std::string >& get_oldIdents() { return oldIdents; } 129 120 std::list< Declaration* >& get_oldDecls() { return oldDecls; } 130 std::list< Attribute * >& get_attributes() { return attributes; }131 121 132 122 virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); } … … 140 130 std::list< std::string > oldIdents; 141 131 std::list< Declaration* > oldDecls; 142 std::list< Attribute * > attributes;143 132 }; 144 133
Note:
See TracChangeset
for help on using the changeset viewer.