diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
commit | 3fba7d16b41dfbefe3b1be6bc0ab94c017728f79 (patch) | |
tree | be5a687969f682edded4aa6f13594ffd9aa9030e /include/llvm/Module.h | |
parent | a16c51cee9225a354c999dd1076d5dba2aa79807 (diff) | |
download | FreeBSD-src-3fba7d16b41dfbefe3b1be6bc0ab94c017728f79.zip FreeBSD-src-3fba7d16b41dfbefe3b1be6bc0ab94c017728f79.tar.gz |
Update LLVM to 93512.
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 9a8b53a..3c8055d 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> { @@ -56,6 +57,7 @@ template<> struct ilist_traits<GlobalAlias> static GlobalAlias *createSentinel(); static void destroySentinel(GlobalAlias *GA) { delete GA; } }; + template<> struct ilist_traits<NamedMDNode> : public SymbolTableListTraits<NamedMDNode, Module> { // createSentinel is used to get hold of a node that marks the end of @@ -68,6 +70,8 @@ template<> struct ilist_traits<NamedMDNode> NamedMDNode *provideInitialHead() const { return createSentinel(); } NamedMDNode *ensureHead(NamedMDNode*) const { return createSentinel(); } static void noteHead(NamedMDNode*, NamedMDNode*) {} + void addNodeToList(NamedMDNode *N); + void removeNodeFromList(NamedMDNode *N); private: mutable ilist_node<NamedMDNode> Sentinel; }; @@ -131,19 +135,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; @@ -379,6 +384,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 |