summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5c96ef7c4e3649ee5119670455d72a320feeb283 (patch)
tree3a1cc20ee28fc1d417ede5313460a8f678ff20b4 /llvm/lib/VMCore/Pass.cpp
parentf840ed7ed4fcec895377ab86a493f4567580e638 (diff)
downloadbcm5719-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/Pass.cpp')
-rw-r--r--llvm/lib/VMCore/Pass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Pass.cpp b/llvm/lib/VMCore/Pass.cpp
index b037994d428..d82389d99d9 100644
--- a/llvm/lib/VMCore/Pass.cpp
+++ b/llvm/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() &&
OpenPOWER on IntegriCloud