mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Only run this mutex test if threading is enabled. This
fixes PR5395. llvm-svn: 89385
This commit is contained in:
parent
1ccfa55fc5
commit
78f8022d71
@ -11,6 +11,7 @@
|
|||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
#include "llvm/LLVMContext.h"
|
#include "llvm/LLVMContext.h"
|
||||||
#include "llvm/ADT/OwningPtr.h"
|
#include "llvm/ADT/OwningPtr.h"
|
||||||
|
#include "llvm/Config/config.h"
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@ -193,6 +194,7 @@ struct LockMutex : ValueMapConfig<KeyT> {
|
|||||||
}
|
}
|
||||||
static sys::Mutex *getMutex(const ExtraData &Data) { return Data.M; }
|
static sys::Mutex *getMutex(const ExtraData &Data) { return Data.M; }
|
||||||
};
|
};
|
||||||
|
#if ENABLE_THREADS
|
||||||
TYPED_TEST(ValueMapTest, LocksMutex) {
|
TYPED_TEST(ValueMapTest, LocksMutex) {
|
||||||
sys::Mutex M(false); // Not recursive.
|
sys::Mutex M(false); // Not recursive.
|
||||||
bool CalledRAUW = false, CalledDeleted = false;
|
bool CalledRAUW = false, CalledDeleted = false;
|
||||||
@ -205,6 +207,7 @@ TYPED_TEST(ValueMapTest, LocksMutex) {
|
|||||||
EXPECT_TRUE(CalledRAUW);
|
EXPECT_TRUE(CalledRAUW);
|
||||||
EXPECT_TRUE(CalledDeleted);
|
EXPECT_TRUE(CalledDeleted);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template<typename KeyT>
|
template<typename KeyT>
|
||||||
struct NoFollow : ValueMapConfig<KeyT> {
|
struct NoFollow : ValueMapConfig<KeyT> {
|
||||||
|
Loading…
Reference in New Issue
Block a user