]> granicus.if.org Git - clang/commitdiff
Attempt to fix LLVM_ENABLE_THREADS=OFF build after r358665
authorNico Weber <nicolasweber@gmx.de>
Sun, 21 Apr 2019 19:18:41 +0000 (19:18 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 21 Apr 2019 19:18:41 +0000 (19:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358858 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index 07aeb50695bc14beec804a09b91aba505fff26c8..46e6340d66ddea940f3465991b5011f61cf846d6 100644 (file)
@@ -8723,7 +8723,9 @@ void clang::setThreadBackgroundPriority() {
   if (getenv("LIBCLANG_BGPRIO_DISABLE"))
     return;
 
+#if LLVM_ENABLE_THREADS
   llvm::set_thread_priority(llvm::ThreadPriority::Background);
+#endif
 }
 
 void cxindex::printDiagsToStderr(ASTUnit *Unit) {