diff options
author | Devang Patel <dpatel@apple.com> | 2010-01-07 19:39:36 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-01-07 19:39:36 +0000 |
commit | 0386f01e061513094504bc11f8352a40173cada7 (patch) | |
tree | 94c2edcbcfba8906e22099dcf3a2c6ef2ebc8897 /include/llvm/Module.h | |
parent | 3c37bb8dbe886993dcd8f37dec0d94762393f3d4 (diff) | |
download | llvm-0386f01e061513094504bc11f8352a40173cada7.tar.gz llvm-0386f01e061513094504bc11f8352a40173cada7.tar.bz2 llvm-0386f01e061513094504bc11f8352a40173cada7.tar.xz |
Use separate namespace for named metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 9a8b53ac58..a5a2ad4600 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -26,6 +26,7 @@ namespace llvm { class FunctionType; class LLVMContext; +class MDSymbolTable; template<> struct ilist_traits<Function> : public SymbolTableListTraits<Function, Module> { @@ -131,19 +132,20 @@ public: /// @name Member Variables /// @{ private: - LLVMContext &Context; ///< The LLVMContext from which types and - ///< constants are allocated. - GlobalListType GlobalList; ///< The Global Variables in the module - FunctionListType FunctionList; ///< The Functions in the module - AliasListType AliasList; ///< The Aliases in the module - LibraryListType LibraryList; ///< The Libraries needed by the module - NamedMDListType NamedMDList; ///< The named metadata in the module - std::string GlobalScopeAsm; ///< Inline Asm at global scope. - ValueSymbolTable *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 + LLVMContext &Context; ///< The LLVMContext from which types and + ///< constants are allocated. + GlobalListType GlobalList; ///< The Global Variables in the module + FunctionListType FunctionList; ///< The Functions in the module + AliasListType AliasList; ///< The Aliases in the module + LibraryListType LibraryList; ///< The Libraries needed by the module + NamedMDListType NamedMDList; ///< The named metadata in the module + std::string GlobalScopeAsm; ///< Inline Asm at global scope. + ValueSymbolTable *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 + MDSymbolTable *NamedMDSymTab; ///< NamedMDNode names. friend class Constant; @@ -322,6 +324,10 @@ public: /// NamedMDNode with the specified name is not found. NamedMDNode *getOrInsertNamedMetadata(StringRef Name); + /// addMDNodeName - Insert an entry in the NamedMDNode symbol table mapping + /// Name to NMD. + void addMDNodeName(StringRef Name, NamedMDNode *NMD); + /// @} /// @name Type Accessors /// @{ @@ -379,6 +385,10 @@ public: const TypeSymbolTable &getTypeSymbolTable() const { return *TypeSymTab; } /// Get the Module's symbol table of types TypeSymbolTable &getTypeSymbolTable() { return *TypeSymTab; } + /// Get the symbol table of named metadata + const MDSymbolTable &getMDSymbolTable() const { return *NamedMDSymTab; } + /// Get the Module's symbol table of named metadata + MDSymbolTable &getMDSymbolTable() { return *NamedMDSymTab; } /// @} /// @name Global Variable Iteration |