Skip to content

Commit a859df3

Browse files
authored
[libc++] Add "using-if-exists" to timespec_get in modules (#78686)
Picolibc does not provide timespec_get function. Adding "using-if-exists" attribute fixes the modules. This is a follow up patch for #78580
1 parent 7616071 commit a859df3

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

libcxx/modules/std.compat/ctime.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export {
2424
using ::mktime;
2525
using ::strftime;
2626
using ::time;
27-
using ::timespec_get;
27+
using ::timespec_get _LIBCPP_USING_IF_EXISTS;
2828
} // export

libcxx/modules/std/ctime.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export namespace std {
2424
using std::mktime;
2525
using std::strftime;
2626
using std::time;
27-
using std::timespec_get;
27+
using std::timespec_get _LIBCPP_USING_IF_EXISTS;
2828
} // namespace std

libcxx/test/libcxx/selftest/modules/std-and-std.compat-module.sh.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
// XFAIL: has-no-cxx-module-support
1414

15-
// picolibc does not provide the required timespec_get function, and the
16-
// "using-if-exists" mechanism apparently did not work here.
17-
// XFAIL: LIBCXX-PICOLIBC-FIXME
18-
1915
// Make sure that the compile flags contain the expected elements.
2016
// The tests only look for the expected components and not the exact flags.
2117
// Otherwise changing the location of the module would break this test.

libcxx/test/libcxx/selftest/modules/std.compat-module.sh.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
// XFAIL: has-no-cxx-module-support
1414

15-
// picolibc does not provide the required timespec_get function, and the
16-
// "using-if-exists" mechanism apparently did not work here.
17-
// XFAIL: LIBCXX-PICOLIBC-FIXME
18-
1915
// Make sure that the compile flags contain the expected elements.
2016
// The tests only look for the expected components and not the exact flags.
2117
// Otherwise changing the location of the module would break this test.

libcxx/test/std/modules/std.compat.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
// XFAIL: has-no-cxx-module-support
1414

15-
// picolibc does not provide the required timespec_get function, and the
16-
// "using-if-exists" mechanism apparently did not work here.
17-
// XFAIL: LIBCXX-PICOLIBC-FIXME
18-
1915
// A minimal test to validate import works.
2016

2117
// MODULE_DEPENDENCIES: std.compat

0 commit comments

Comments
 (0)