aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/LeakDetector.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-07 18:33:04 +0000
committerOwen Anderson <resistor@mac.com>2009-07-07 18:33:04 +0000
commitbe44bedb7fe330e36f5ed544aa48c59742a52185 (patch)
tree79e3d7e0aafc4352dafe175986671f4353c0c5e2 /lib/VMCore/LeakDetector.cpp
parent4b62237cdb1089ec0c9f3e364babaa48ff4b61bf (diff)
downloadexternal_llvm-be44bedb7fe330e36f5ed544aa48c59742a52185.zip
external_llvm-be44bedb7fe330e36f5ed544aa48c59742a52185.tar.gz
external_llvm-be44bedb7fe330e36f5ed544aa48c59742a52185.tar.bz2
Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LeakDetector.cpp')
-rw-r--r--lib/VMCore/LeakDetector.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/LeakDetector.cpp b/lib/VMCore/LeakDetector.cpp
index b5926bc..a6be1af 100644
--- a/lib/VMCore/LeakDetector.cpp
+++ b/lib/VMCore/LeakDetector.cpp
@@ -54,7 +54,7 @@ namespace {
// immediately, it is added to the CachedValue Value. If it is
// immediately removed, no set search need be performed.
void addGarbage(const T* o) {
- sys::SmartScopedWriter<true> Writer(&*LeakDetectorLock);
+ sys::SmartScopedWriter<true> Writer(*LeakDetectorLock);
if (Cache) {
assert(Ts.count(Cache) == 0 && "Object already in set!");
Ts.insert(Cache);
@@ -63,7 +63,7 @@ namespace {
}
void removeGarbage(const T* o) {
- sys::SmartScopedWriter<true> Writer(&*LeakDetectorLock);
+ sys::SmartScopedWriter<true> Writer(*LeakDetectorLock);
if (o == Cache)
Cache = 0; // Cache hit
else
@@ -73,7 +73,7 @@ namespace {
bool hasGarbage(const std::string& Message) {
addGarbage(0); // Flush the Cache
- sys::SmartScopedReader<true> Reader(&*LeakDetectorLock);
+ sys::SmartScopedReader<true> Reader(*LeakDetectorLock);
assert(Cache == 0 && "No value should be cached anymore!");
if (!Ts.empty()) {