diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-01 10:31:22 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-01 10:31:22 +0000 |
commit | a16c51cee9225a354c999dd1076d5dba2aa79807 (patch) | |
tree | dba00119388b84f9f44e6ec5e9129f807fd79ca3 /include/llvm/LLVMContext.h | |
parent | 40a6fcdb85efd93fe0e36c9552cfb0b18b5eacd6 (diff) | |
download | FreeBSD-src-a16c51cee9225a354c999dd1076d5dba2aa79807.zip FreeBSD-src-a16c51cee9225a354c999dd1076d5dba2aa79807.tar.gz |
Update LLVM to 92395.
Diffstat (limited to 'include/llvm/LLVMContext.h')
-rw-r--r-- | include/llvm/LLVMContext.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index b9ffeb0..6d36d5e 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -18,7 +18,8 @@ namespace llvm { class LLVMContextImpl; -class MetadataContext; +class StringRef; +template <typename T> class SmallVectorImpl; /// This is an important class for using LLVM in a threaded context. It /// (opaquely) owns and manages the core "global" data of LLVM's core @@ -31,14 +32,23 @@ class LLVMContext { void operator=(LLVMContext&); public: - LLVMContextImpl* const pImpl; - MetadataContext &getMetadata(); + LLVMContextImpl *const pImpl; LLVMContext(); ~LLVMContext(); + + /// 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; }; -/// FOR BACKWARDS COMPATIBILITY - Returns a global context. -extern LLVMContext& getGlobalContext(); +/// getGlobalContext - Returns a global context. This is for LLVM clients that +/// only care about operating on a single thread. +extern LLVMContext &getGlobalContext(); } |