Skip to content

Commit 68c2a81

Browse files
authored
[libc++][C++03] Fix ODR tests (#169349)
We don't really need to include `<__config>`. We just need to include a public C++ header.
1 parent 51dd3ec commit 68c2a81

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// ABI tags have no effect in MSVC mode.
1010
// XFAIL: msvc
1111

12-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
13-
1412
// Test that we encode whether exceptions are supported in an ABI tag to avoid
1513
// ODR violations when linking TUs that have different values for it.
1614

@@ -24,14 +22,14 @@
2422

2523
// -fno-exceptions
2624
#ifdef TU1
27-
# include <__config>
25+
# include <version>
2826
_LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 1; }
2927
int tu1() { return f(); }
3028
#endif // TU1
3129

3230
// -fexceptions
3331
#ifdef TU2
34-
# include <__config>
32+
# include <version>
3533
_LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 2; }
3634
int tu2() { return f(); }
3735
#endif // TU2

libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// ABI tags have no effect in MSVC mode.
1010
// XFAIL: msvc
1111

12-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
13-
1412
// Test that we encode the hardening mode in an ABI tag to avoid ODR violations
1513
// when linking TUs that have different values for it.
1614

@@ -27,28 +25,28 @@
2725

2826
// fast hardening mode
2927
#ifdef TU1
30-
# include <__config>
28+
# include <version>
3129
_LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 1; }
3230
int tu1() { return f(); }
3331
#endif // TU1
3432

3533
// extensive hardening mode
3634
#ifdef TU2
37-
# include <__config>
35+
# include <version>
3836
_LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 2; }
3937
int tu2() { return f(); }
4038
#endif // TU2
4139

4240
// debug hardening mode
4341
#ifdef TU3
44-
# include <__config>
42+
# include <version>
4543
_LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 3; }
4644
int tu3() { return f(); }
4745
#endif // TU3
4846

4947
// No hardening
5048
#ifdef TU4
51-
# include <__config>
49+
# include <version>
5250
_LIBCPP_HIDE_FROM_ABI TEST_NOINLINE inline int f() { return 4; }
5351
int tu4() { return f(); }
5452
#endif // TU4

0 commit comments

Comments
 (0)