[llvm] [Support] Include Support/thread.h before api implementations (PR #111175)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 6 14:15:56 PDT 2024


================
@@ -33,6 +33,13 @@
 #include <pthread_np.h> // For pthread_getthreadid_np() / pthread_set_name_np()
 #endif
 
+// Must be included after Threading.inc to provide definition for llvm::thread
+// because FreeBSD's condvar.h (included by user.h) misuses the "thread"
+// keyword.
+#ifndef __FreeBSD__
----------------
compnerd wrote:

I wonder if we should just undef thread instead on FreeBSD. I think that we can just do this for now, it is more conservative.

https://github.com/llvm/llvm-project/pull/111175


More information about the llvm-commits mailing list