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 | 62ce4e88fd9ab6c6edcb12d44a89f03fbf202faa (patch) | |
| tree | 7fde4f939c6da61424d814153c5f0ec12423be57 /llvm/unittests/IR/ValueMapTest.cpp | |
| parent | 8fb31112482ebf335b717b783cbefa1f60930fd4 (diff) | |
| download | llvm-62ce4e88fd9ab6c6edcb12d44a89f03fbf202faa.zip llvm-62ce4e88fd9ab6c6edcb12d44a89f03fbf202faa.tar.gz llvm-62ce4e88fd9ab6c6edcb12d44a89f03fbf202faa.tar.bz2 | |
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
llvm-svn: 211214
Diffstat (limited to 'llvm/unittests/IR/ValueMapTest.cpp')
| -rw-r--r-- | llvm/unittests/IR/ValueMapTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/IR/ValueMapTest.cpp b/llvm/unittests/IR/ValueMapTest.cpp index 248740a..51acd2f 100644 --- a/llvm/unittests/IR/ValueMapTest.cpp +++ b/llvm/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; |
