================
@@ -10,8 +10,14 @@
#ifndef __CRC32INTRIN_H
#define __CRC32INTRIN_H
-#define __DEFAULT_FN_ATTRS
\
+/// We only declare crc32 as a constexpr if we are compiling C++ code
+#if defined(__cplusplus) && (__cplusplus >= 201103L)
+#define __DEFAULT_FN_ATTRS_CONSTEXPR
\
+ __attribute__((__always_inline__, __nodebug__, __target__("crc32")))
constexpr
+#else
+#define __DEFAULT_FN_ATTRS_CONSTEXPR
\
----------------
raventid wrote:
Fixed by
https://github.com/llvm/llvm-project/pull/173908/changes/e06b49fd965ade188b3ff7fe9b0a77443050064d
https://github.com/llvm/llvm-project/pull/173908
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits