diff options
| author | Zachary Turner <zturner@google.com> | 2014-06-20 21:07:14 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2014-06-20 21:07:14 +0000 |
| commit | c04b892f93c5e3205dc0adb0f88df47fcefdc6d2 (patch) | |
| tree | 407880f072bfd886644197a030ff2691523f3d3c /llvm/unittests/IR/ValueMapTest.cpp | |
| parent | 06f09b58f7d712a047fc1a52f86b3d4177b13844 (diff) | |
| download | llvm-c04b892f93c5e3205dc0adb0f88df47fcefdc6d2.zip llvm-c04b892f93c5e3205dc0adb0f88df47fcefdc6d2.tar.gz llvm-c04b892f93c5e3205dc0adb0f88df47fcefdc6d2.tar.bz2 | |
Revert "Replace Execution Engine's mutex with std::recursive_mutex."
This reverts commit 1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd, due to
GCC / MinGW's lack of support for C++11 threading.
It's possible this will go back in after we come up with a
reasonable solution.
llvm-svn: 211401
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 ef82588..0b7198f 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->try_lock()) << "Mutex should already be locked."; + EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked."; } static void onDelete(const ExtraData &Data, KeyT Old) { *Data.CalledDeleted = true; - EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked."; + EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked."; } static MutexT *getMutex(const ExtraData &Data) { return Data.M; } }; #if LLVM_ENABLE_THREADS TYPED_TEST(ValueMapTest, LocksMutex) { - std::mutex M; // Not recursive. + sys::Mutex M(false); // Not recursive. bool CalledRAUW = false, CalledDeleted = false; - typedef LockMutex<TypeParam*, std::mutex> ConfigType; + typedef LockMutex<TypeParam*, sys::Mutex> ConfigType; typename ConfigType::ExtraData Data = {&M, &CalledRAUW, &CalledDeleted}; ValueMap<TypeParam*, int, ConfigType> VM(Data); VM[this->BitcastV.get()] = 7; |
