[clang-tools-extra] r345729 - Delete dependency on config.h
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 31 08:37:09 PDT 2018
Author: kadircet
Date: Wed Oct 31 08:37:09 2018
New Revision: 345729
URL: http://llvm.org/viewvc/llvm-project?rev=345729&view=rev
Log:
Delete dependency on config.h
Summary:
Since llvm/Config/config.h is not available on standalone builds,
use __USE_POSIX instead of HAVE_PTHREAD_H and get rid of the include.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: lebedev.ri, krytarowski, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D53935
Modified:
clang-tools-extra/trunk/clangd/Threading.cpp
Modified: clang-tools-extra/trunk/clangd/Threading.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Threading.cpp?rev=345729&r1=345728&r2=345729&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Threading.cpp (original)
+++ clang-tools-extra/trunk/clangd/Threading.cpp Wed Oct 31 08:37:09 2018
@@ -1,11 +1,10 @@
#include "Threading.h"
#include "Trace.h"
#include "llvm/ADT/ScopeExit.h"
-#include "llvm/Config/config.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Threading.h"
#include <thread>
-#ifdef HAVE_PTHREAD_H
+#ifdef __USE_POSIX
#include <pthread.h>
#endif
@@ -102,7 +101,7 @@ void wait(std::unique_lock<std::mutex> &
}
void setThreadPriority(std::thread &T, ThreadPriority Priority) {
-#if defined(HAVE_PTHREAD_H) && defined(__linux__)
+#ifdef __linux__
sched_param priority;
priority.sched_priority = 0;
pthread_setschedparam(
More information about the cfe-commits
mailing list