aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Value.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
commita9d1f2c559ef4b2549e29288fe6944e68913ba0f (patch)
tree79e3d7e0aafc4352dafe175986671f4353c0c5e2 /lib/VMCore/Value.cpp
parentfd15beefeedcb8108913e75e7c736dfcc17b433a (diff)
downloadexternal_llvm-a9d1f2c559ef4b2549e29288fe6944e68913ba0f.zip
external_llvm-a9d1f2c559ef4b2549e29288fe6944e68913ba0f.tar.gz
external_llvm-a9d1f2c559ef4b2549e29288fe6944e68913ba0f.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/Value.cpp')
-rw-r--r--lib/VMCore/Value.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index c952b78..e980a5d 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -430,7 +430,7 @@ void ValueHandleBase::AddToUseList() {
if (VP->HasValueHandle) {
// If this value already has a ValueHandle, then it must be in the
// ValueHandles map already.
- sys::SmartScopedReader<true> Reader(&*ValueHandlesLock);
+ sys::SmartScopedReader<true> Reader(*ValueHandlesLock);
ValueHandleBase *&Entry = (*ValueHandles)[VP];
assert(Entry != 0 && "Value doesn't have any handles?");
AddToExistingUseList(&Entry);
@@ -442,7 +442,7 @@ void ValueHandleBase::AddToUseList() {
// reallocate itself, which would invalidate all of the PrevP pointers that
// point into the old table. Handle this by checking for reallocation and
// updating the stale pointers only if needed.
- sys::SmartScopedWriter<true> Writer(&*ValueHandlesLock);
+ sys::SmartScopedWriter<true> Writer(*ValueHandlesLock);
ValueHandlesTy &Handles = *ValueHandles;
const void *OldBucketPtr = Handles.getPointerIntoBucketsArray();
@@ -484,7 +484,7 @@ void ValueHandleBase::RemoveFromUseList() {
// If the Next pointer was null, then it is possible that this was the last
// ValueHandle watching VP. If so, delete its entry from the ValueHandles
// map.
- sys::SmartScopedWriter<true> Writer(&*ValueHandlesLock);
+ sys::SmartScopedWriter<true> Writer(*ValueHandlesLock);
ValueHandlesTy &Handles = *ValueHandles;
if (Handles.isPointerIntoBucketsArray(PrevPtr)) {
Handles.erase(VP);