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/Support/Annotation.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/Support/Annotation.cpp')
-rw-r--r-- | llvm/lib/Support/Annotation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Annotation.cpp b/llvm/lib/Support/Annotation.cpp index 4b5b97e41f3..9f76256b295 100644 --- a/llvm/lib/Support/Annotation.cpp +++ b/llvm/lib/Support/Annotation.cpp @@ -55,7 +55,7 @@ static FactMapType &getFactMap() { } static void eraseFromFactMap(unsigned ID) { - sys::SmartScopedWriter<true> Writer(&*AnnotationsLock); + sys::SmartScopedWriter<true> Writer(*AnnotationsLock); TheFactMap->erase(ID); } @@ -66,7 +66,7 @@ AnnotationID AnnotationManager::getID(const char *Name) { // Name -> ID AnnotationsLock->reader_release(); if (I == E) { - sys::SmartScopedWriter<true> Writer(&*AnnotationsLock); + sys::SmartScopedWriter<true> Writer(*AnnotationsLock); I = IDMap->find(Name); if (I == IDMap->end()) { unsigned newCount = sys::AtomicIncrement(&IDCounter); @@ -91,7 +91,7 @@ AnnotationID AnnotationManager::getID(const char *Name, Factory Fact, // only be used for debugging. // const char *AnnotationManager::getName(AnnotationID ID) { // ID -> Name - sys::SmartScopedReader<true> Reader(&*AnnotationsLock); + sys::SmartScopedReader<true> Reader(*AnnotationsLock); IDMapType &TheMap = *IDMap; for (IDMapType::iterator I = TheMap.begin(); ; ++I) { assert(I != TheMap.end() && "Annotation ID is unknown!"); @@ -106,7 +106,7 @@ const char *AnnotationManager::getName(AnnotationID ID) { // ID -> Name void AnnotationManager::registerAnnotationFactory(AnnotationID ID, AnnFactory F, void *ExtraData) { if (F) { - sys::SmartScopedWriter<true> Writer(&*AnnotationsLock); + sys::SmartScopedWriter<true> Writer(*AnnotationsLock); getFactMap()[ID.ID] = std::make_pair(F, ExtraData); } else { eraseFromFactMap(ID.ID); |