diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-07 18:33:04 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-07 18:33:04 +0000 |
commit | 5c96ef7c4e3649ee5119670455d72a320feeb283 (patch) | |
tree | 3a1cc20ee28fc1d417ede5313460a8f678ff20b4 /llvm/lib/VMCore/LeakDetector.cpp | |
parent | f840ed7ed4fcec895377ab86a493f4567580e638 (diff) | |
download | bcm5719-llvm-5c96ef7c4e3649ee5119670455d72a320feeb283.tar.gz bcm5719-llvm-5c96ef7c4e3649ee5119670455d72a320feeb283.zip |
Have scoped mutexes take referenes instead of pointers.
llvm-svn: 74931
Diffstat (limited to 'llvm/lib/VMCore/LeakDetector.cpp')
-rw-r--r-- | llvm/lib/VMCore/LeakDetector.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/LeakDetector.cpp b/llvm/lib/VMCore/LeakDetector.cpp index b5926bcf441..a6be1afed49 100644 --- a/llvm/lib/VMCore/LeakDetector.cpp +++ b/llvm/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()) { |