[llvm-commits] [llvm] r89385 - /llvm/trunk/unittests/ADT/ValueMapTest.cpp
Duncan Sands
baldrick at free.fr
Thu Nov 19 12:48:15 PST 2009
Author: baldrick
Date: Thu Nov 19 14:48:14 2009
New Revision: 89385
URL: http://llvm.org/viewvc/llvm-project?rev=89385&view=rev
Log:
Only run this mutex test if threading is enabled. This
fixes PR5395.
Modified:
llvm/trunk/unittests/ADT/ValueMapTest.cpp
Modified: llvm/trunk/unittests/ADT/ValueMapTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/ValueMapTest.cpp?rev=89385&r1=89384&r2=89385&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/ValueMapTest.cpp (original)
+++ llvm/trunk/unittests/ADT/ValueMapTest.cpp Thu Nov 19 14:48:14 2009
@@ -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 @@
}
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 @@
EXPECT_TRUE(CalledRAUW);
EXPECT_TRUE(CalledDeleted);
}
+#endif
template<typename KeyT>
struct NoFollow : ValueMapConfig<KeyT> {
More information about the llvm-commits
mailing list