[compiler-rt] eaa329e - [ORC-RT] Handle missing __has_builtin operator.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 03:20:43 PDT 2021
Author: Lang Hames
Date: 2021-07-19T20:20:31+10:00
New Revision: eaa329e76e72da518a1b185a804f6bb5d41b7ff4
URL: https://github.com/llvm/llvm-project/commit/eaa329e76e72da518a1b185a804f6bb5d41b7ff4
DIFF: https://github.com/llvm/llvm-project/commit/eaa329e76e72da518a1b185a804f6bb5d41b7ff4.diff
LOG: [ORC-RT] Handle missing __has_builtin operator.
For compilers that do not support __has_builtin just return '0'. This should fix
the bot failure at https://lab.llvm.org/buildbot/#/builders/165/builds/3761.
Added:
Modified:
compiler-rt/lib/orc/compiler.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/orc/compiler.h b/compiler-rt/lib/orc/compiler.h
index fcc4f2011adb..a262fb48bda8 100644
--- a/compiler-rt/lib/orc/compiler.h
+++ b/compiler-rt/lib/orc/compiler.h
@@ -18,6 +18,10 @@
#define ORC_RT_INTERFACE extern "C" __attribute__((visibility("default")))
#define ORC_RT_HIDDEN __attribute__((visibility("hidden")))
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
// Only use __has_cpp_attribute in C++ mode. GCC defines __has_cpp_attribute in
// C mode, but the :: in __has_cpp_attribute(scoped::attribute) is invalid.
#ifndef ORC_RT_HAS_CPP_ATTRIBUTE
More information about the llvm-commits
mailing list