Skip to content

Conversation

@philnik777
Copy link
Contributor

We don't really need to include <__config>. We just need to include a public C++ header.

@philnik777 philnik777 marked this pull request as ready for review November 25, 2025 11:49
@philnik777 philnik777 requested a review from a team as a code owner November 25, 2025 11:49
@philnik777 philnik777 merged commit 68c2a81 into llvm:main Nov 25, 2025
82 checks passed
@philnik777 philnik777 deleted the cxx03_fix_odr_tests branch November 25, 2025 11:50
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 25, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 25, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

We don't really need to include &lt;__config&gt;. We just need to include a public C++ header.


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

2 Files Affected:

  • (modified) libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp (+2-4)
  • (modified) libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp (+4-6)
diff --git a/libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp b/libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp
index c0ba48eb245d2..61aaf4f952a66 100644
--- a/libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp
+++ b/libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp
@@ -9,8 +9,6 @@
 // ABI tags have no effect in MSVC mode.
 // XFAIL: msvc
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // Test that we encode whether exceptions are supported in an ABI tag to avoid
 // ODR violations when linking TUs that have different values for it.
 
@@ -24,14 +22,14 @@
 
 // -fno-exceptions
 #ifdef TU1
-#  include <__config>
+#  include <version>
 _LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 1; }
 int tu1() { return f(); }
 #endif // TU1
 
 // -fexceptions
 #ifdef TU2
-#  include <__config>
+#  include <version>
 _LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 2; }
 int tu2() { return f(); }
 #endif // TU2
diff --git a/libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp b/libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp
index 8daf3f3fd0463..28647d78c64cd 100644
--- a/libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp
+++ b/libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp
@@ -9,8 +9,6 @@
 // ABI tags have no effect in MSVC mode.
 // XFAIL: msvc
 
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
 // Test that we encode the hardening mode in an ABI tag to avoid ODR violations
 // when linking TUs that have different values for it.
 
@@ -27,28 +25,28 @@
 
 // fast hardening mode
 #ifdef TU1
-#  include <__config>
+#  include <version>
 _LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 1; }
 int tu1() { return f(); }
 #endif // TU1
 
 // extensive hardening mode
 #ifdef TU2
-#  include <__config>
+#  include <version>
 _LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 2; }
 int tu2() { return f(); }
 #endif // TU2
 
 // debug hardening mode
 #ifdef TU3
-#  include <__config>
+#  include <version>
 _LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 3; }
 int tu3() { return f(); }
 #endif // TU3
 
 // No hardening
 #ifdef TU4
-#  include <__config>
+#  include <version>
 _LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 4; }
 int tu4() { return f(); }
 #endif // TU4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants