blob: de61356a5cc6c31d83dd24f1640b680d055b694b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
LLVM 15 adds __noinline__ as a keyword to match behaviour of GCC 12.
When this macro is left in, it can cause the expression __attribute__((__noinline__)) to be expanded incorrectly.
When the __noinline__ keyword is available disable the macro.
Ref: https://reviews.llvm.org/D124866
https://bugs.gentoo.org/85712
===================================================================
--- a/include/hip/amd_detail/host_defines.h
+++ b/include/hip/amd_detail/host_defines.h
@@ -47,7 +47,9 @@ THE SOFTWARE.
#define __constant__ __attribute__((constant))
#endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
+#if !defined(__has_feature) || !__has_feature(cuda_noinline_keyword)
#define __noinline__ __attribute__((noinline))
+#endif
#define __forceinline__ inline __attribute__((always_inline))
#if __HIP_NO_IMAGE_SUPPORT
|