Skip to content

Commit 87ec1f4

Browse files
Artem-Btru
authored andcommitted
Work around two more instances of __noinline__ conflicts. (#66138)
Fixes llvm/llvm-project#57544 (cherry picked from commit 588023ddafb4b0cd11914ab068c6d07187374d69)
1 parent 9da5b7a commit 87ec1f4

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

clang/lib/Headers/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ set(cuda_wrapper_files
275275

276276
set(cuda_wrapper_bits_files
277277
cuda_wrappers/bits/shared_ptr_base.h
278+
cuda_wrappers/bits/basic_string.h
279+
cuda_wrappers/bits/basic_string.tcc
278280
)
279281

280282
set(ppc_wrapper_files
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// CUDA headers define __noinline__ which interferes with libstdc++'s use of
2+
// `__attribute((__noinline__))`. In order to avoid compilation error,
3+
// temporarily unset __noinline__ when we include affected libstdc++ header.
4+
5+
#pragma push_macro("__noinline__")
6+
#undef __noinline__
7+
#include_next "bits/basic_string.h"
8+
9+
#pragma pop_macro("__noinline__")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// CUDA headers define __noinline__ which interferes with libstdc++'s use of
2+
// `__attribute((__noinline__))`. In order to avoid compilation error,
3+
// temporarily unset __noinline__ when we include affected libstdc++ header.
4+
5+
#pragma push_macro("__noinline__")
6+
#undef __noinline__
7+
#include_next "bits/basic_string.tcc"
8+
9+
#pragma pop_macro("__noinline__")

0 commit comments

Comments
 (0)