diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-06 07:24:44 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-06 07:24:44 +0000 |
commit | 78d033e086e19e016273de014f9214aa6f3f844b (patch) | |
tree | 3af27ec8e6611c9380be3b8ce3e643138488851c /include/llvm/Module.h | |
parent | f8383def5c31acfab4fd55c9fb395d417fd65c45 (diff) |
For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 42214af1ac..e5c157be95 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -25,6 +25,7 @@ class GlobalVariable; class GlobalValueRefMap; // Used by ConstantVals.cpp class FunctionType; class SymbolTable; +class TypeSymbolTable; template<> struct ilist_traits<Function> : public SymbolTableListTraits<Function, Module, Module> { @@ -91,7 +92,8 @@ private: FunctionListType FunctionList; ///< The Functions in the module LibraryListType LibraryList; ///< The Libraries needed by the module std::string GlobalScopeAsm; ///< Inline Asm at global scope. - SymbolTable *SymTab; ///< Symbol Table for the module + SymbolTable *ValSymTab; ///< Symbol table for values + TypeSymbolTable *TypeSymTab; ///< Symbol table for types std::string ModuleID; ///< Human readable identifier for the module std::string TargetTriple; ///< Platform target triple Module compiled on std::string DataLayout; ///< Target data description @@ -237,9 +239,13 @@ public: /// Get the Module's list of functions. FunctionListType &getFunctionList() { return FunctionList; } /// Get the symbol table of global variable and function identifiers - const SymbolTable &getSymbolTable() const { return *SymTab; } + const SymbolTable &getValueSymbolTable() const { return *ValSymTab; } /// Get the Module's symbol table of global variable and function identifiers. - SymbolTable &getSymbolTable() { return *SymTab; } + SymbolTable &getValueSymbolTable() { return *ValSymTab; } + /// Get the symbol table of types + const TypeSymbolTable &getTypeSymbolTable() const { return *TypeSymTab; } + /// Get the Module's symbol table of types + TypeSymbolTable &getTypeSymbolTable() { return *TypeSymTab; } /// @} /// @name Global Variable Iteration |