Changes in src/AST/SymbolTable.hpp [e5c3811:e67991f]
- File:
-
- 1 edited
-
src/AST/SymbolTable.hpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/SymbolTable.hpp
re5c3811 re67991f 33 33 class SymbolTable final : public std::enable_shared_from_this<ast::SymbolTable> { 34 34 public: 35 /// special functions stored in dedicated tables, with different lookup keys36 enum SpecialFunctionKind {CTOR, DTOR, ASSIGN, NUMBER_OF_KINDS};37 static SpecialFunctionKind getSpecialFunctionKind(const std::string & name);38 39 35 /// Stored information about a declaration 40 36 struct IdData { … … 81 77 UnionTable::Ptr unionTable; ///< union namespace 82 78 TraitTable::Ptr traitTable; ///< trait namespace 83 IdTable::Ptr specialFunctionTable[NUMBER_OF_KINDS];84 85 // using SpecialFuncTable = PersistentMap< std::string, IdTable::Ptr >; // fname (ctor/dtor/assign) - otypekey86 // SpecialFuncTable::Ptr specialFuncTable;87 79 88 80 using Ptr = std::shared_ptr<const SymbolTable>; … … 103 95 /// Gets all declarations with the given ID 104 96 std::vector<IdData> lookupId( const std::string &id ) const; 105 /// Gets special functions associated with a type; if no key is given, returns everything106 std::vector<IdData> specialLookupId( SpecialFunctionKind kind, const std::string & otypeKey = "" ) const;107 97 /// Gets the top-most type declaration with the given ID 108 98 const NamedTypeDecl * lookupType( const std::string &id ) const; … … 155 145 156 146 /// convenience function for adding all of the declarations in a function type to the indexer 157 void addFunction ( const FunctionDecl *);147 void addFunctionType( const FunctionType * ftype ); 158 148 159 149 private: … … 196 186 const Decl * deleter = nullptr ); 197 187 198 /// common code for addId when special decls are placed into separate tables199 void addId(200 const DeclWithType * decl, const std::string & lookupKey, IdTable::Ptr & idTable, OnConflict handleConflicts,201 const Expr * baseExpr = nullptr, const Decl * deleter = nullptr);202 203 188 /// adds all of the members of the Aggregate (addWith helper) 204 189 void addMembers( const AggregateDecl * aggr, const Expr * expr, OnConflict handleConflicts );
Note:
See TracChangeset
for help on using the changeset viewer.