Changeset 0ac366b for src/SymTab/Indexer.h
- Timestamp:
- Feb 15, 2018, 11:39:12 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 4a161be
- Parents:
- f5883bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.h
rf5883bd r0ac366b 19 19 #include <list> // for list 20 20 #include <string> // for string 21 #include <functional> // for function 21 22 22 23 #include "SynTree/Visitor.h" // for Visitor … … 65 66 66 67 /// looks up a specific mangled ID at the given scope 67 DeclarationWithType *lookupIdAtScope( const std::string &id, const std::string &mangleName, unsigned long scope ) const; 68 IdData * lookupIdAtScope( const std::string &id, const std::string &mangleName, unsigned long scope ); 69 const IdData * lookupIdAtScope( const std::string &id, const std::string &mangleName, unsigned long scope ) const; 68 70 /// returns true if there exists a declaration with C linkage and the given name with a different mangled name 69 71 bool hasIncompatibleCDecl( const std::string &id, const std::string &mangleName, unsigned long scope ) const; … … 77 79 TraitDecl *lookupTraitAtScope( const std::string &id, unsigned long scope ) const; 78 80 79 void addId( DeclarationWithType *decl, Expression * baseExpr = nullptr ); 81 typedef std::function<bool(IdData &, const std::string &)> ConflictFunction; 82 83 void addId( DeclarationWithType * decl, Expression * baseExpr = nullptr ); 84 void addDeletedId( DeclarationWithType * decl, BaseSyntaxNode * deleteStmt ); 85 80 86 void addType( NamedTypeDecl *decl ); 81 87 void addStruct( const std::string &id ); … … 87 93 88 94 /// adds all of the IDs from WithStmt exprs 89 void addWith( std::list< Expression * > & withExprs );95 void addWith( std::list< Expression * > & withExprs, BaseSyntaxNode * withStmt ); 90 96 91 97 /// adds all of the members of the Aggregate (addWith helper) 92 void addMembers( AggregateDecl * aggr, Expression * expr );98 void addMembers( AggregateDecl * aggr, Expression * expr, ConflictFunction ); 93 99 94 100 /// convenience function for adding a list of Ids to the indexer … … 120 126 /// Ensures that tables variable is writable (i.e. allocated, uniquely owned by this Indexer, and at the current scope) 121 127 void makeWritable(); 128 129 /// common code for addId, addDeletedId, etc. 130 void addId( DeclarationWithType * decl, ConflictFunction, Expression * baseExpr = nullptr, BaseSyntaxNode * deleteStmt = nullptr ); 122 131 }; 123 132 } // namespace SymTab
Note: See TracChangeset
for help on using the changeset viewer.