diff options
Diffstat (limited to 'include/llvm/LLVMContext.h')
-rw-r--r-- | include/llvm/LLVMContext.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index 7cb6579aef..76492b7102 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -20,6 +20,7 @@ namespace llvm { class LLVMContextImpl; class StringRef; class Instruction; +class Module; template <typename T> class SmallVectorImpl; /// This is an important class for using LLVM in a threaded context. It @@ -37,6 +38,13 @@ public: LLVMContext(); ~LLVMContext(); + /// addModule - Register a module as being instantiated in this context. If + /// the context is deleted, the module will be deleted as well. + void addModule(Module*); + + /// removeModule - Unregister a module from this context. + void removeModule(Module*); + // Pinned metadata names, which always have the same value. This is a // compile-time performance optimization, not a correctness optimization. enum { |