summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-05-16 12:25:43 +0000
committerDuncan Sands <baldrick@free.fr>2012-05-16 12:25:43 +0000
commitabaf91557fbcba7868068c13afc798e7898a3325 (patch)
tree896b29168697154af8d2a18cff84cd30e7dd61c2
parent8bc3434e68028263c42dd26bde3c16450cb146f4 (diff)
downloadllvm-abaf91557fbcba7868068c13afc798e7898a3325.tar.gz
llvm-abaf91557fbcba7868068c13afc798e7898a3325.tar.bz2
llvm-abaf91557fbcba7868068c13afc798e7898a3325.tar.xz
I noticed that named metadata doesn't provide a direct way of getting at the
named metadata list, unlike all the other global objects (global variables, functions, aliases), so add that for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156915 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Module.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 570b1bc7b4..cb7c1dc36a 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -498,6 +498,13 @@ public:
static iplist<GlobalAlias> Module::*getSublistAccess(GlobalAlias*) {
return &Module::AliasList;
}
+ /// Get the Module's list of named metadata (constant).
+ const NamedMDListType &getNamedMDList() const { return NamedMDList; }
+ /// Get the Module's list of named metadata.
+ NamedMDListType &getNamedMDList() { return NamedMDList; }
+ static ilist<NamedMDNode> Module::*getSublistAccess(NamedMDNode*) {
+ return &Module::NamedMDList;
+ }
/// Get the symbol table of global variable and function identifiers
const ValueSymbolTable &getValueSymbolTable() const { return *ValSymTab; }
/// Get the Module's symbol table of global variable and function identifiers.