summaryrefslogtreecommitdiff
path: root/unittests/Support/ManagedStatic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Support/ManagedStatic.cpp')
-rw-r--r--unittests/Support/ManagedStatic.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/Support/ManagedStatic.cpp b/unittests/Support/ManagedStatic.cpp
index 8ddad38ecf..1497f4e340 100644
--- a/unittests/Support/ManagedStatic.cpp
+++ b/unittests/Support/ManagedStatic.cpp
@@ -19,7 +19,8 @@ using namespace llvm;
namespace {
-#if defined(HAVE_PTHREAD_H) && !__has_feature(memory_sanitizer)
+#if LLVM_ENABLE_THREADS != 0 && defined(HAVE_PTHREAD_H) && \
+ !__has_feature(memory_sanitizer)
namespace test1 {
llvm::ManagedStatic<int> ms;
void *helper(void*) {