diff options
author | Duncan Sands <baldrick@free.fr> | 2009-11-19 20:48:14 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-11-19 20:48:14 +0000 |
commit | b83012a180dbd8d55672fd946ac9c6256cb00bce (patch) | |
tree | 5ccff475ccce61efd1e480aba92f3aa5f87720d6 /unittests | |
parent | 160069d15aef1cd756bae112da9149c98308da68 (diff) |
Only run this mutex test if threading is enabled. This
fixes PR5395.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/ValueMapTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/ADT/ValueMapTest.cpp b/unittests/ADT/ValueMapTest.cpp index 9159657530..451e30a743 100644 --- a/unittests/ADT/ValueMapTest.cpp +++ b/unittests/ADT/ValueMapTest.cpp @@ -11,6 +11,7 @@ #include "llvm/Instructions.h" #include "llvm/LLVMContext.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/Config/config.h" #include "gtest/gtest.h" @@ -193,6 +194,7 @@ struct LockMutex : ValueMapConfig<KeyT> { } static sys::Mutex *getMutex(const ExtraData &Data) { return Data.M; } }; +#if ENABLE_THREADS TYPED_TEST(ValueMapTest, LocksMutex) { sys::Mutex M(false); // Not recursive. bool CalledRAUW = false, CalledDeleted = false; @@ -205,6 +207,7 @@ TYPED_TEST(ValueMapTest, LocksMutex) { EXPECT_TRUE(CalledRAUW); EXPECT_TRUE(CalledDeleted); } +#endif template<typename KeyT> struct NoFollow : ValueMapConfig<KeyT> { |