Skip to content

Commit 588023d

Browse files
authored
Work around two more instances of __noinline__ conflicts. (#66138)
Fixes #57544
1 parent b853988 commit 588023d

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
@@ -289,6 +289,8 @@ set(cuda_wrapper_files
289289

290290
set(cuda_wrapper_bits_files
291291
cuda_wrappers/bits/shared_ptr_base.h
292+
cuda_wrappers/bits/basic_string.h
293+
cuda_wrappers/bits/basic_string.tcc
292294
)
293295

294296
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)