[libcxx-commits] [libcxxabi] [libcxxabi/demangle] Remove __cxxabi_config.h include (PR #101971)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 5 06:16:35 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxxabi

Author: Nico Weber (nico)

<details>
<summary>Changes</summary>

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

``````````

</details>


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


More information about the libcxx-commits mailing list