[PATCH] D149364: [CUDA] Temporarily undefine __noinline__ when including bits/shared_ptr_base.h
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 1 16:27:49 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa50e54fbeb48: [CUDA] Temporarily undefine __noinline__ when including bits/shared_ptr_base.h (authored by tra).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149364/new/
https://reviews.llvm.org/D149364
Files:
clang/lib/Headers/CMakeLists.txt
clang/lib/Headers/cuda_wrappers/bits/shared_ptr_base.h
Index: clang/lib/Headers/cuda_wrappers/bits/shared_ptr_base.h
===================================================================
--- /dev/null
+++ clang/lib/Headers/cuda_wrappers/bits/shared_ptr_base.h
@@ -0,0 +1,9 @@
+// CUDA headers define __noinline__ which interferes with libstdc++'s use of
+// `__attribute((__noinline__))`. In order to avoid compilation error,
+// temporarily unset __noinline__ when we include affected libstdc++ header.
+
+#pragma push_macro("__noinline__")
+#undef __noinline__
+#include_next "bits/shared_ptr_base.h"
+
+#pragma pop_macro("__noinline__")
Index: clang/lib/Headers/CMakeLists.txt
===================================================================
--- clang/lib/Headers/CMakeLists.txt
+++ clang/lib/Headers/CMakeLists.txt
@@ -262,6 +262,7 @@
cuda_wrappers/cmath
cuda_wrappers/complex
cuda_wrappers/new
+ cuda_wrappers/bits/shared_ptr_base.h
)
set(ppc_wrapper_files
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149364.518598.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230501/bb233224/attachment.bin>
More information about the cfe-commits
mailing list