From a9d1f2c559ef4b2549e29288fe6944e68913ba0f Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 7 Jul 2009 18:33:04 +0000 Subject: 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 --- lib/VMCore/Type.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/VMCore/Type.cpp') diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 40d7517049..b415251497 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -1006,7 +1006,7 @@ const IntegerType *IntegerType::get(unsigned NumBits) { // First, see if the type is already in the table, for which // a reader lock suffices. - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); ITy = IntegerTypes->get(IVT); if (!ITy) { @@ -1079,7 +1079,7 @@ FunctionType *FunctionType::get(const Type *ReturnType, FunctionValType VT(ReturnType, Params, isVarArg); FunctionType *FT = 0; - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); FT = FunctionTypes->get(VT); if (!FT) { @@ -1129,7 +1129,7 @@ ArrayType *ArrayType::get(const Type *ElementType, uint64_t NumElements) { ArrayValType AVT(ElementType, NumElements); ArrayType *AT = 0; - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); AT = ArrayTypes->get(AVT); if (!AT) { @@ -1188,7 +1188,7 @@ VectorType *VectorType::get(const Type *ElementType, unsigned NumElements) { VectorValType PVT(ElementType, NumElements); VectorType *PT = 0; - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); PT = VectorTypes->get(PVT); if (!PT) { @@ -1250,7 +1250,7 @@ StructType *StructType::get(const std::vector &ETypes, StructValType STV(ETypes, isPacked); StructType *ST = 0; - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); ST = StructTypes->get(STV); if (!ST) { @@ -1329,7 +1329,7 @@ PointerType *PointerType::get(const Type *ValueType, unsigned AddressSpace) { PointerType *PT = 0; - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); PT = PointerTypes->get(PVT); if (!PT) { @@ -1488,7 +1488,7 @@ void DerivedType::unlockedRefineAbstractTypeTo(const Type *NewType) { void DerivedType::refineAbstractTypeTo(const Type *NewType) { // All recursive calls will go through unlockedRefineAbstractTypeTo, // to avoid deadlock problems. - sys::SmartScopedLock L(&*TypeMapLock); + sys::SmartScopedLock L(*TypeMapLock); unlockedRefineAbstractTypeTo(NewType); } -- cgit v1.2.3