]> granicus.if.org Git - clang/commitdiff
[clang][CIndex] Use llvm::set_thread_priority
authorKadir Cetinkaya <kadircet@google.com>
Thu, 18 Apr 2019 13:49:20 +0000 (13:49 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Thu, 18 Apr 2019 13:49:20 +0000 (13:49 +0000)
Reviewers: jkorous, gribozavr

Subscribers: dexonsmith, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60867

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358665 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index 7bc1c459d8bc1793b98da61214385b0560935172..07aeb50695bc14beec804a09b91aba505fff26c8 100644 (file)
@@ -8723,9 +8723,7 @@ void clang::setThreadBackgroundPriority() {
   if (getenv("LIBCLANG_BGPRIO_DISABLE"))
     return;
 
-#ifdef USE_DARWIN_THREADS
-  setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);
-#endif
+  llvm::set_thread_priority(llvm::ThreadPriority::Background);
 }
 
 void cxindex::printDiagsToStderr(ASTUnit *Unit) {