[llvm-commits] [llvm] r156915 - /llvm/trunk/include/llvm/Module.h
Duncan Sands
baldrick at free.fr
Wed May 16 05:25:43 PDT 2012
Author: baldrick
Date: Wed May 16 07:25:43 2012
New Revision: 156915
URL: http://llvm.org/viewvc/llvm-project?rev=156915&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/Module.h
Modified: llvm/trunk/include/llvm/Module.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Module.h?rev=156915&r1=156914&r2=156915&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Module.h (original)
+++ llvm/trunk/include/llvm/Module.h Wed May 16 07:25:43 2012
@@ -498,6 +498,13 @@
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.
More information about the llvm-commits
mailing list