mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-19 19:25:40 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user