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)
llvm-svn: 358858

clang/tools/libclang/CIndex.cpp

index 07aeb50..46e6340 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) {