Skip to content

[libcxxabi/demangle] Remove __cxxabi_config.h include #101971

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

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

nico
Copy link
Contributor

@nico nico commented Aug 5, 2024

The demangler is shared between libcxxabi and llvm/lib/Demangle, see libcxxabi/src/demangle/README.txt. The copy in llvm/lib/Demangle cannot use __cxxabi_config.h. Remove the include. It was only used to identify clang, which can easily be done without the include as well.

No intended behavior change.

The demangler is shared between libcxxabi and llvm/lib/Demangle, see
libcxxabi/src/demangle/README.txt. The copy in llvm/lib/Demangle cannot
use __cxxabi_config.h. Remove the include. It was only used to identify
clang, which can easily be done without the include as well.

No intended behavior change.
@nico nico requested a review from a team as a code owner August 5, 2024 13:15
@llvmbot llvmbot added the libc++abi libc++abi C++ Runtime Library. Not libc++. label Aug 5, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 5, 2024

@llvm/pr-subscribers-libcxxabi

Author: Nico Weber (nico)

Changes

The demangler is shared between libcxxabi and llvm/lib/Demangle, see libcxxabi/src/demangle/README.txt. The copy in llvm/lib/Demangle cannot use __cxxabi_config.h. Remove the include. It was only used to identify clang, which can easily be done without the include as well.

No intended behavior change.


Full diff: https://github.com/llvm/llvm-project/pull/101971.diff

1 Files Affected:

  • (modified) libcxxabi/src/demangle/ItaniumDemangle.h (+2-3)
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index ecc9b1aeb5c6f..88de234a6e0b9 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -19,7 +19,6 @@
 #include "DemangleConfig.h"
 #include "StringViewExtras.h"
 #include "Utility.h"
-#include <__cxxabi_config.h>
 #include <algorithm>
 #include <cctype>
 #include <cstdio>
@@ -31,7 +30,7 @@
 #include <type_traits>
 #include <utility>
 
-#ifdef _LIBCXXABI_COMPILER_CLANG
+#if defined(__clang__)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wunused-template"
 #endif
@@ -5948,7 +5947,7 @@ struct ManglingParser : AbstractManglingParser<ManglingParser<Alloc>, Alloc> {
 
 DEMANGLE_NAMESPACE_END
 
-#ifdef _LIBCXXABI_COMPILER_CLANG
+#if defined(__clang__)
 #pragma clang diagnostic pop
 #endif
 

@nico
Copy link
Contributor Author

nico commented Aug 5, 2024

Virtually all compiles have passed, and it's not like this change will affect tests. Hitting merge.

@nico nico merged commit 08a61eb into llvm:main Aug 5, 2024
56 of 58 checks passed
@nico nico deleted the cxxabidemangle branch August 5, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++abi libc++abi C++ Runtime Library. Not libc++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants