From 7bd4fa1ca5ea12ae0f03cb35df309a305378da85 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 18 Apr 2019 13:49:20 +0000 Subject: [PATCH] [clang][CIndex] Use llvm::set_thread_priority 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 7bc1c459d8..07aeb50695 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -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) { -- 2.40.0