summaryrefslogtreecommitdiff
path: root/lib/VMCore/Pass.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/Pass.cpp
parentfd15beefeedcb8108913e75e7c736dfcc17b433a (diff)
downloadllvm-a9d1f2c559ef4b2549e29288fe6944e68913ba0f.tar.gz
llvm-a9d1f2c559ef4b2549e29288fe6944e68913ba0f.tar.bz2
llvm-a9d1f2c559ef4b2549e29288fe6944e68913ba0f.tar.xz
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/Pass.cpp')
-rw-r--r--lib/VMCore/Pass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp
index b037994d42..d82389d99d 100644
--- a/lib/VMCore/Pass.cpp
+++ b/lib/VMCore/Pass.cpp
@@ -233,7 +233,7 @@ void PassInfo::registerPass() {
getPassRegistrar()->RegisterPass(*this);
// Notify any listeners.
- sys::SmartScopedLock<true> Lock(&ListenersLock);
+ sys::SmartScopedLock<true> Lock(ListenersLock);
if (Listeners)
for (std::vector<PassRegistrationListener*>::iterator
I = Listeners->begin(), E = Listeners->end(); I != E; ++I)
@@ -286,14 +286,14 @@ RegisterAGBase::RegisterAGBase(const char *Name, intptr_t InterfaceID,
// PassRegistrationListener ctor - Add the current object to the list of
// PassRegistrationListeners...
PassRegistrationListener::PassRegistrationListener() {
- sys::SmartScopedLock<true> Lock(&ListenersLock);
+ sys::SmartScopedLock<true> Lock(ListenersLock);
if (!Listeners) Listeners = new std::vector<PassRegistrationListener*>();
Listeners->push_back(this);
}
// dtor - Remove object from list of listeners...
PassRegistrationListener::~PassRegistrationListener() {
- sys::SmartScopedLock<true> Lock(&ListenersLock);
+ sys::SmartScopedLock<true> Lock(ListenersLock);
std::vector<PassRegistrationListener*>::iterator I =
std::find(Listeners->begin(), Listeners->end(), this);
assert(Listeners && I != Listeners->end() &&