[llvm-commits] [llvm] r113380 - /llvm/trunk/include/llvm/LLVMContext.h

Owen Anderson resistor at mac.com
Wed Sep 8 11:22:11 PDT 2010


Author: resistor
Date: Wed Sep  8 13:22:11 2010
New Revision: 113380

URL: http://llvm.org/viewvc/llvm-project?rev=113380&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/LLVMContext.h

Modified: llvm/trunk/include/llvm/LLVMContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=113380&r1=113379&r2=113380&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LLVMContext.h (original)
+++ llvm/trunk/include/llvm/LLVMContext.h Wed Sep  8 13:22:11 2010
@@ -33,11 +33,6 @@
   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 @@
   /// 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 {





More information about the llvm-commits mailing list