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 | a9d1f2c559ef4b2549e29288fe6944e68913ba0f (patch) | |
tree | 79e3d7e0aafc4352dafe175986671f4353c0c5e2 /lib/VMCore/Type.cpp | |
parent | fd15beefeedcb8108913e75e7c736dfcc17b433a (diff) | |
download | llvm-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/Type.cpp')
-rw-r--r-- | lib/VMCore/Type.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> 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<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> 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<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> 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<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> L(*TypeMapLock); PT = VectorTypes->get(PVT); if (!PT) { @@ -1250,7 +1250,7 @@ StructType *StructType::get(const std::vector<const Type*> &ETypes, StructValType STV(ETypes, isPacked); StructType *ST = 0; - sys::SmartScopedLock<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> 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<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> 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<true> L(&*TypeMapLock); + sys::SmartScopedLock<true> L(*TypeMapLock); unlockedRefineAbstractTypeTo(NewType); } |