From 78f8022d711a050e894126e10e695d54ad9cb7e9 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Thu, 19 Nov 2009 20:48:14 +0000 Subject: [PATCH] Only run this mutex test if threading is enabled. This fixes PR5395. llvm-svn: 89385 --- unittests/ADT/ValueMapTest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unittests/ADT/ValueMapTest.cpp b/unittests/ADT/ValueMapTest.cpp index 91596575304..451e30a7434 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 { } 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 struct NoFollow : ValueMapConfig {