summaryrefslogtreecommitdiff
path: root/include/llvm/LLVMContext.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-09-08 18:22:11 +0000
committerOwen Anderson <resistor@mac.com>2010-09-08 18:22:11 +0000
commit1e8d5d2e2216e024293872a102ecf3be2a34e3d2 (patch)
tree8d4e07c567e8e291f7d0d075d281d5086d0d9e71 /include/llvm/LLVMContext.h
parent0a7dd4fa4062eb4e452864e049ca3c8a6db8b8d7 (diff)
downloadllvm-1e8d5d2e2216e024293872a102ecf3be2a34e3d2.tar.gz
llvm-1e8d5d2e2216e024293872a102ecf3be2a34e3d2.tar.bz2
llvm-1e8d5d2e2216e024293872a102ecf3be2a34e3d2.tar.xz
Make module ownership methods on LLVMContext private, and make Module a friend
so that it can access them. These are not intended to be externally accessible APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/LLVMContext.h')
-rw-r--r--include/llvm/LLVMContext.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h
index 76492b7102..fb89aa4bc6 100644
--- a/include/llvm/LLVMContext.h
+++ b/include/llvm/LLVMContext.h
@@ -33,11 +33,6 @@ class LLVMContext {
LLVMContext(LLVMContext&);
void operator=(LLVMContext&);
-public:
- LLVMContextImpl *const pImpl;
- 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*);
@@ -45,6 +40,14 @@ public:
/// removeModule - Unregister a module from this context.
void removeModule(Module*);
+ // Module needs access to the add/removeModule methods.
+ friend class Module;
+
+public:
+ LLVMContextImpl *const pImpl;
+ LLVMContext();
+ ~LLVMContext();
+
// Pinned metadata names, which always have the same value. This is a
// compile-time performance optimization, not a correctness optimization.
enum {