summaryrefslogtreecommitdiff
path: root/include/llvm/Module.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-29 09:01:33 +0000
committerChris Lattner <sabre@nondot.org>2009-12-29 09:01:33 +0000
commit081134741b40b342fb2f85722c9cea5d412489a8 (patch)
tree73cd43fda7814ed745c3c31de92ff8c7bbf93721 /include/llvm/Module.h
parente3e38ea9fb70cbd8cc33111589c92c0a61674679 (diff)
downloadllvm-081134741b40b342fb2f85722c9cea5d412489a8.tar.gz
llvm-081134741b40b342fb2f85722c9cea5d412489a8.tar.bz2
llvm-081134741b40b342fb2f85722c9cea5d412489a8.tar.xz
Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r--include/llvm/Module.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 895ee01f83..9a8b53ac58 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -184,7 +184,7 @@ public:
/// Get the global data context.
/// @returns LLVMContext - a container for LLVM's global information
- LLVMContext& getContext() const { return Context; }
+ LLVMContext &getContext() const { return Context; }
/// Get any module-scope inline assembly blocks.
/// @returns a string containing the module-scope inline assembly blocks.
@@ -222,6 +222,15 @@ public:
/// if a global with the specified name is not found.
GlobalValue *getNamedValue(StringRef Name) const;
+ /// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
+ /// This ID is uniqued across modules in the current LLVMContext.
+ unsigned getMDKindID(StringRef Name) const;
+
+ /// getMDKindNames - Populate client supplied SmallVector with the name for
+ /// custom metadata IDs registered in this LLVMContext. ID #0 is not used,
+ /// so it is filled in as an empty string.
+ void getMDKindNames(SmallVectorImpl<StringRef> &Result) const;
+
/// @}
/// @name Function Accessors
/// @{