-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work around two more instances of __noinline__ conflicts. #66138
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
llvmbot
added
clang
Clang issues not falling into any other category
backend:X86
clang:headers
Headers provided by Clang, e.g. for intrinsics
labels
Sep 12, 2023
@llvm/pr-subscribers-backend-x86 Changes#57544Full diff: https://github.com/llvm/llvm-project/pull/66138.diff 3 Files Affected:
diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt index 39030d433a61ec7..334bc13799409bb 100644 --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt @@ -289,6 +289,8 @@ set(cuda_wrapper_files set(cuda_wrapper_bits_files cuda_wrappers/bits/shared_ptr_base.h + cuda_wrappers/bits/basic_string.h + cuda_wrappers/bits/basic_string.tcc ) set(ppc_wrapper_files diff --git a/clang/lib/Headers/cuda_wrappers/bits/basic_string.h b/clang/lib/Headers/cuda_wrappers/bits/basic_string.h new file mode 100644 index 000000000000000..64f50d9f6a72e7a --- /dev/null +++ b/clang/lib/Headers/cuda_wrappers/bits/basic_string.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/basic_string.h" + +#pragma pop_macro("__noinline__") diff --git a/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc b/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc new file mode 100644 index 000000000000000..90c7fe34d93255f --- /dev/null +++ b/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc @@ -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/basic_string.tcc" + +#pragma pop_macro("__noinline__") |
@llvm/pr-subscribers-clang Changes#57544Full diff: https://github.com/llvm/llvm-project/pull/66138.diff 3 Files Affected:
diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt index 39030d433a61ec7..334bc13799409bb 100644 --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt @@ -289,6 +289,8 @@ set(cuda_wrapper_files set(cuda_wrapper_bits_files cuda_wrappers/bits/shared_ptr_base.h + cuda_wrappers/bits/basic_string.h + cuda_wrappers/bits/basic_string.tcc ) set(ppc_wrapper_files diff --git a/clang/lib/Headers/cuda_wrappers/bits/basic_string.h b/clang/lib/Headers/cuda_wrappers/bits/basic_string.h new file mode 100644 index 000000000000000..64f50d9f6a72e7a --- /dev/null +++ b/clang/lib/Headers/cuda_wrappers/bits/basic_string.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/basic_string.h" + +#pragma pop_macro("__noinline__") diff --git a/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc b/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc new file mode 100644 index 000000000000000..90c7fe34d93255f --- /dev/null +++ b/clang/lib/Headers/cuda_wrappers/bits/basic_string.tcc @@ -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/basic_string.tcc" + +#pragma pop_macro("__noinline__") |
yxsamliu
approved these changes
Sep 12, 2023
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this pull request
Sep 19, 2023
tru
pushed a commit
that referenced
this pull request
Sep 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend:X86
clang:headers
Headers provided by Clang, e.g. for intrinsics
clang
Clang issues not falling into any other category
cuda
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#57544