Reapply my less-lock-contention-in-leak-detector patch, now with new files
[oota-llvm.git] / lib / VMCore / LLVMContextImpl.h
index aaa48ca0d4fa06abbafc1d03f3d3409f8913626d..20d410eaf87840812d9ff054ec4747c902f1709c 100644 (file)
@@ -16,6 +16,7 @@
 #define LLVM_LLVMCONTEXT_IMPL_H
 
 #include "ConstantsContext.h"
+#include "LeaksContext.h"
 #include "TypesContext.h"
 #include "llvm/LLVMContext.h"
 #include "llvm/Constants.h"
@@ -134,6 +135,10 @@ public:
   ConstantInt *TheTrueVal;
   ConstantInt *TheFalseVal;
   
+  // Lock used for guarding access to the leak detector
+  sys::SmartMutex<true> LLVMObjectsLock;
+  LeakDetectorImpl<Value> LLVMObjects;
+  
   // Lock used for guarding access to the type maps.
   sys::SmartMutex<true> TypeMapLock;