diff options
author | Zachary Turner <zturner@google.com> | 2014-06-18 20:17:35 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-06-18 20:17:35 +0000 |
commit | 1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd (patch) | |
tree | 82933a5d1d0e64418c721231a411dac3d9267f12 /unittests | |
parent | b2791542c2c5df2912848b8bdf06fb1093d4ac12 (diff) | |
download | llvm-1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd.tar.gz llvm-1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd.tar.bz2 llvm-1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd.tar.xz |
Replace Execution Engine's mutex with std::recursive_mutex.
This change has a bit of a trickle down effect due to the fact that
there are a number of derived implementations of ExecutionEngine,
and that the mutex is not tightly encapsulated so is used by other
classes directly.
Reviewed by: rnk
Differential Revision: http://reviews.llvm.org/D4196
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/IR/ValueMapTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/IR/ValueMapTest.cpp b/unittests/IR/ValueMapTest.cpp index 248740aeb7..51acd2fc64 100644 --- a/unittests/IR/ValueMapTest.cpp +++ b/unittests/IR/ValueMapTest.cpp @@ -186,19 +186,19 @@ struct LockMutex : ValueMapConfig<KeyT, MutexT> { }; static void onRAUW(const ExtraData &Data, KeyT Old, KeyT New) { *Data.CalledRAUW = true; - EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked."; + EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked."; } static void onDelete(const ExtraData &Data, KeyT Old) { *Data.CalledDeleted = true; - EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked."; + EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked."; } static MutexT *getMutex(const ExtraData &Data) { return Data.M; } }; #if LLVM_ENABLE_THREADS TYPED_TEST(ValueMapTest, LocksMutex) { - sys::Mutex M(false); // Not recursive. + std::mutex M; // Not recursive. bool CalledRAUW = false, CalledDeleted = false; - typedef LockMutex<TypeParam*, sys::Mutex> ConfigType; + typedef LockMutex<TypeParam*, std::mutex> ConfigType; typename ConfigType::ExtraData Data = {&M, &CalledRAUW, &CalledDeleted}; ValueMap<TypeParam*, int, ConfigType> VM(Data); VM[this->BitcastV.get()] = 7; |