[llvm] r354045 - Support: use internal `call_once` on PPC64le

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 10:36:52 PST 2019


Author: compnerd
Date: Thu Feb 14 10:36:52 2019
New Revision: 354045

URL: http://llvm.org/viewvc/llvm-project?rev=354045&view=rev
Log:
Support: use internal `call_once` on PPC64le

Always use the internal `call_once` for PPC64le.  This is needed to
support the Swift toolchain on PPC64le.

Patch by Sarvesh Tamba!

Modified:
    llvm/trunk/include/llvm/Support/Threading.h

Modified: llvm/trunk/include/llvm/Support/Threading.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Threading.h?rev=354045&r1=354044&r2=354045&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Threading.h (original)
+++ llvm/trunk/include/llvm/Support/Threading.h Thu Feb 14 10:36:52 2019
@@ -32,6 +32,9 @@
 // implementations like libstdc++ are known to have problems on NetBSD,
 // OpenBSD and PowerPC.
 #define LLVM_THREADING_USE_STD_CALL_ONCE 1
+#elif defined(LLVM_ON_UNIX) &&                                                 \
+    ((defined(__ppc__) || defined(__PPC__)) && defined(__LITTLE_ENDIAN__))
+#define LLVM_THREADING_USE_STD_CALL_ONCE 1
 #else
 #define LLVM_THREADING_USE_STD_CALL_ONCE 0
 #endif




More information about the llvm-commits mailing list