[libcxx-commits] [libcxx] Reverts around time_zone (PR #95058)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 10 16:23:49 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Florian Mayer (fmayer)
<details>
<summary>Changes</summary>
I intend to submit those as separate changes, not as one squashed change.
---
Patch is 141.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/95058.diff
35 Files Affected:
- (modified) libcxx/include/CMakeLists.txt (-2)
- (removed) libcxx/include/__chrono/exception.h (-129)
- (modified) libcxx/include/__chrono/time_zone.h (-85)
- (removed) libcxx/include/__chrono/zoned_time.h (-55)
- (modified) libcxx/include/chrono (-24)
- (modified) libcxx/include/module.modulemap (+1-6)
- (modified) libcxx/modules/std/chrono.inc (+9-4)
- (modified) libcxx/src/CMakeLists.txt (-3)
- (removed) libcxx/src/chrono_exception.cpp (-22)
- (modified) libcxx/src/time_zone.cpp (-147)
- (modified) libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp (-11)
- (removed) libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp (-53)
- (removed) libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp (-53)
- (removed) libcxx/test/libcxx/time/time.zone/time.zone.timezone/choose.pass.cpp (-37)
- (removed) libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_local.pass.cpp (-40)
- (removed) libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp (-39)
- (removed) libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp (-41)
- (modified) libcxx/test/libcxx/transitive_includes/cxx03.csv (+3)
- (modified) libcxx/test/libcxx/transitive_includes/cxx11.csv (+3)
- (modified) libcxx/test/libcxx/transitive_includes/cxx14.csv (+3)
- (modified) libcxx/test/libcxx/transitive_includes/cxx17.csv (+3)
- (modified) libcxx/test/libcxx/transitive_includes/cxx20.csv (+8-1)
- (modified) libcxx/test/libcxx/transitive_includes/cxx23.csv (+11-1)
- (modified) libcxx/test/libcxx/transitive_includes/cxx26.csv (+34-1)
- (removed) libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.ambig/ctor.pass.cpp (-171)
- (removed) libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.ambig/types.pass.cpp (-50)
- (removed) libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/ctor.pass.cpp (-172)
- (removed) libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.pass.cpp (-50)
- (removed) libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.local_time.pass.cpp (-1304)
- (removed) libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_local.pass.cpp (-68)
- (removed) libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp (-237)
- (removed) libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp (-147)
- (removed) libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_default_zone.pass.cpp (-36)
- (removed) libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_locate_zone.pass.cpp (-45)
- (removed) libcxx/test/std/time/time.zone/time.zone.zonedtraits/types.compile.pass.cpp (-33)
``````````diff
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index d65b7ce782ebd..cfe1f44777bca 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -250,7 +250,6 @@ set(files
__chrono/convert_to_tm.h
__chrono/day.h
__chrono/duration.h
- __chrono/exception.h
__chrono/file_clock.h
__chrono/formatter.h
__chrono/hh_mm_ss.h
@@ -277,7 +276,6 @@ set(files
__chrono/year_month.h
__chrono/year_month_day.h
__chrono/year_month_weekday.h
- __chrono/zoned_time.h
__compare/common_comparison_category.h
__compare/compare_partial_order_fallback.h
__compare/compare_strong_order_fallback.h
diff --git a/libcxx/include/__chrono/exception.h b/libcxx/include/__chrono/exception.h
deleted file mode 100644
index 75fd0615b7e08..0000000000000
--- a/libcxx/include/__chrono/exception.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
-
-#ifndef _LIBCPP___CHRONO_EXCEPTION_H
-#define _LIBCPP___CHRONO_EXCEPTION_H
-
-#include <version>
-// Enable the contents of the header only when libc++ was built with experimental features enabled.
-#if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
-
-# include <__chrono/calendar.h>
-# include <__chrono/local_info.h>
-# include <__chrono/time_point.h>
-# include <__config>
-# include <__configuration/availability.h>
-# include <__verbose_abort>
-# include <format>
-# include <stdexcept>
-# include <string>
-
-# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-# endif
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-# if _LIBCPP_STD_VER >= 20
-
-namespace chrono {
-
-class nonexistent_local_time : public runtime_error {
-public:
- template <class _Duration>
- _LIBCPP_HIDE_FROM_ABI nonexistent_local_time(const local_time<_Duration>& __time, const local_info& __info)
- : runtime_error{__create_message(__time, __info)} {
- // [time.zone.exception.nonexist]/2
- // Preconditions: i.result == local_info::nonexistent is true.
- // The value of __info.result is not used.
- _LIBCPP_ASSERT_PEDANTIC(__info.result == local_info::nonexistent,
- "creating an nonexistent_local_time from a local_info that is not non-existent");
- }
-
- _LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI ~nonexistent_local_time() override; // exported as key function
-
-private:
- template <class _Duration>
- _LIBCPP_HIDE_FROM_ABI string __create_message(const local_time<_Duration>& __time, const local_info& __info) {
- return std::format(
- R"({} is in a gap between
-{} {} and
-{} {} which are both equivalent to
-{} UTC)",
- __time,
- local_seconds{__info.first.end.time_since_epoch()} + __info.first.offset,
- __info.first.abbrev,
- local_seconds{__info.second.begin.time_since_epoch()} + __info.second.offset,
- __info.second.abbrev,
- __info.first.end);
- }
-};
-
-template <class _Duration>
-_LIBCPP_NORETURN _LIBCPP_AVAILABILITY_TZDB _LIBCPP_HIDE_FROM_ABI void __throw_nonexistent_local_time(
- [[maybe_unused]] const local_time<_Duration>& __time, [[maybe_unused]] const local_info& __info) {
-# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
- throw nonexistent_local_time(__time, __info);
-# else
- _LIBCPP_VERBOSE_ABORT("nonexistent_local_time was thrown in -fno-exceptions mode");
-# endif
-}
-
-class ambiguous_local_time : public runtime_error {
-public:
- template <class _Duration>
- _LIBCPP_HIDE_FROM_ABI ambiguous_local_time(const local_time<_Duration>& __time, const local_info& __info)
- : runtime_error{__create_message(__time, __info)} {
- // [time.zone.exception.ambig]/2
- // Preconditions: i.result == local_info::ambiguous is true.
- // The value of __info.result is not used.
- _LIBCPP_ASSERT_PEDANTIC(__info.result == local_info::ambiguous,
- "creating an ambiguous_local_time from a local_info that is not ambiguous");
- }
-
- _LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI ~ambiguous_local_time() override; // exported as key function
-
-private:
- template <class _Duration>
- _LIBCPP_HIDE_FROM_ABI string __create_message(const local_time<_Duration>& __time, const local_info& __info) {
- return std::format(
- // There are two spaces after the full-stop; this has been verified
- // in the sources of the Standard.
- R"({0} is ambiguous. It could be
-{0} {1} == {2} UTC or
-{0} {3} == {4} UTC)",
- __time,
- __info.first.abbrev,
- __time - __info.first.offset,
- __info.second.abbrev,
- __time - __info.second.offset);
- }
-};
-
-template <class _Duration>
-_LIBCPP_NORETURN _LIBCPP_AVAILABILITY_TZDB _LIBCPP_HIDE_FROM_ABI void __throw_ambiguous_local_time(
- [[maybe_unused]] const local_time<_Duration>& __time, [[maybe_unused]] const local_info& __info) {
-# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
- throw ambiguous_local_time(__time, __info);
-# else
- _LIBCPP_VERBOSE_ABORT("ambiguous_local_time was thrown in -fno-exceptions mode");
-# endif
-}
-
-} // namespace chrono
-
-# endif // _LIBCPP_STD_VER >= 20
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
-
-#endif // _LIBCPP___CHRONO_EXCEPTION_H
diff --git a/libcxx/include/__chrono/time_zone.h b/libcxx/include/__chrono/time_zone.h
index de11dac1eef0c..91ddab8903fe2 100644
--- a/libcxx/include/__chrono/time_zone.h
+++ b/libcxx/include/__chrono/time_zone.h
@@ -16,16 +16,12 @@
// Enable the contents of the header only when libc++ was built with experimental features enabled.
#if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
-# include <__chrono/calendar.h>
# include <__chrono/duration.h>
-# include <__chrono/exception.h>
-# include <__chrono/local_info.h>
# include <__chrono/sys_info.h>
# include <__chrono/system_clock.h>
# include <__compare/strong_order.h>
# include <__config>
# include <__memory/unique_ptr.h>
-# include <__type_traits/common_type.h>
# include <string_view>
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -42,8 +38,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono {
-enum class choose { earliest, latest };
-
class _LIBCPP_AVAILABILITY_TZDB time_zone {
_LIBCPP_HIDE_FROM_ABI time_zone() = default;
@@ -69,91 +63,12 @@ class _LIBCPP_AVAILABILITY_TZDB time_zone {
return __get_info(chrono::time_point_cast<seconds>(__time));
}
- template <class _Duration>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI local_info get_info(const local_time<_Duration>& __time) const {
- return __get_info(chrono::time_point_cast<seconds>(__time));
- }
-
- // We don't apply nodiscard here since this function throws on many inputs,
- // so it could be used as a validation.
- template <class _Duration>
- _LIBCPP_HIDE_FROM_ABI sys_time<common_type_t<_Duration, seconds>> to_sys(const local_time<_Duration>& __time) const {
- local_info __info = get_info(__time);
- switch (__info.result) {
- case local_info::unique:
- return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.first.offset};
-
- case local_info::nonexistent:
- chrono::__throw_nonexistent_local_time(__time, __info);
-
- case local_info::ambiguous:
- chrono::__throw_ambiguous_local_time(__time, __info);
- }
-
- // TODO TZDB The Standard does not specify anything in these cases.
- _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
- __info.result != -1, "cannot convert the local time; it would be before the minimum system clock value");
- _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
- __info.result != -2, "cannot convert the local time; it would be after the maximum system clock value");
-
- return {};
- }
-
- template <class _Duration>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI sys_time<common_type_t<_Duration, seconds>>
- to_sys(const local_time<_Duration>& __time, choose __z) const {
- local_info __info = get_info(__time);
- switch (__info.result) {
- case local_info::unique:
- case local_info::nonexistent: // first and second are the same
- return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.first.offset};
-
- case local_info::ambiguous:
- switch (__z) {
- case choose::earliest:
- return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.first.offset};
-
- case choose::latest:
- return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.second.offset};
-
- // Note a value out of bounds is not specified.
- }
- }
-
- // TODO TZDB The standard does not specify anything in these cases.
- _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
- __info.result != -1, "cannot convert the local time; it would be before the minimum system clock value");
- _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
- __info.result != -2, "cannot convert the local time; it would be after the maximum system clock value");
-
- return {};
- }
-
- template <class _Duration>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI local_time<common_type_t<_Duration, seconds>>
- to_local(const sys_time<_Duration>& __time) const {
- using _Dp = common_type_t<_Duration, seconds>;
-
- sys_info __info = get_info(__time);
-
- _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
- __info.offset >= chrono::seconds{0} || __time.time_since_epoch() >= _Dp::min() - __info.offset,
- "cannot convert the system time; it would be before the minimum local clock value");
-
- _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
- __info.offset <= chrono::seconds{0} || __time.time_since_epoch() <= _Dp::max() - __info.offset,
- "cannot convert the system time; it would be after the maximum local clock value");
-
- return local_time<_Dp>{__time.time_since_epoch() + __info.offset};
- }
-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI const __impl& __implementation() const noexcept { return *__impl_; }
private:
[[nodiscard]] _LIBCPP_EXPORTED_FROM_ABI string_view __name() const noexcept;
[[nodiscard]] _LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI sys_info __get_info(sys_seconds __time) const;
- [[nodiscard]] _LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI local_info __get_info(local_seconds __time) const;
unique_ptr<__impl> __impl_;
};
diff --git a/libcxx/include/__chrono/zoned_time.h b/libcxx/include/__chrono/zoned_time.h
deleted file mode 100644
index c6084426ad72b..0000000000000
--- a/libcxx/include/__chrono/zoned_time.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
-
-#ifndef _LIBCPP___CHRONO_ZONED_TIME_H
-#define _LIBCPP___CHRONO_ZONED_TIME_H
-
-#include <version>
-// Enable the contents of the header only when libc++ was built with experimental features enabled.
-#if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
-
-# include <__chrono/time_zone.h>
-# include <__chrono/tzdb_list.h>
-# include <__config>
-# include <__fwd/string_view.h>
-
-# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-# endif
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-# if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-
-namespace chrono {
-
-template <class>
-struct zoned_traits {};
-
-template <>
-struct zoned_traits<const time_zone*> {
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI static const time_zone* default_zone() { return chrono::locate_zone("UTC"); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI static const time_zone* locate_zone(string_view __name) {
- return chrono::locate_zone(__name);
- }
-};
-
-} // namespace chrono
-
-# endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
- // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
-
-#endif // _LIBCPP___CHRONO_ZONED_TIME_H
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index c1a92595ff1f5..96a3e92faa81f 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -724,10 +724,6 @@ const time_zone* current_zone()
const tzdb& reload_tzdb(); // C++20
string remote_version(); // C++20
-// [time.zone.exception], exception classes
-class nonexistent_local_time; // C++20
-class ambiguous_local_time; // C++20
-
// [time.zone.info], information classes
struct sys_info { // C++20
sys_seconds begin;
@@ -767,28 +763,10 @@ class time_zone {
template<class Duration>
sys_info get_info(const sys_time<Duration>& st) const;
-
- template<class Duration>
- local_info get_info(const local_time<Duration>& tp) const;
-
- template<class Duration>
- sys_time<common_type_t<Duration, seconds>>
- to_sys(const local_time<Duration>& tp) const;
-
- template<class Duration>
- sys_time<common_type_t<Duration, seconds>>
- to_sys(const local_time<Duration>& tp, choose z) const;
-
- template<class Duration>
- local_time<common_type_t<Duration, seconds>>
- to_local(const sys_time<Duration>& tp) const;
};
bool operator==(const time_zone& x, const time_zone& y) noexcept; // C++20
strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept; // C++20
-// [time.zone.zonedtraits], class template zoned_traits
-template<class T> struct zoned_traits; // C++20
-
// [time.zone.leap], leap second support
class leap_second { // C++20
public:
@@ -934,7 +912,6 @@ constexpr chrono::year operator ""y(unsigned lo
#if _LIBCPP_STD_VER >= 20
# include <__chrono/calendar.h>
# include <__chrono/day.h>
-# include <__chrono/exception.h>
# include <__chrono/hh_mm_ss.h>
# include <__chrono/literals.h>
# include <__chrono/local_info.h>
@@ -962,7 +939,6 @@ constexpr chrono::year operator ""y(unsigned lo
# include <__chrono/time_zone_link.h>
# include <__chrono/tzdb.h>
# include <__chrono/tzdb_list.h>
-# include <__chrono/zoned_time.h>
# endif
#endif
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 892d2c6b4af3c..48391b2a12095 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -1101,7 +1101,6 @@ module std_private_chrono_duration [system] {
header "__chrono/duration.h"
export std_private_type_traits_is_convertible
}
-module std_private_chrono_exception [system] { header "__chrono/exception.h" }
module std_private_chrono_file_clock [system] { header "__chrono/file_clock.h" }
module std_private_chrono_formatter [system] {
header "__chrono/formatter.h"
@@ -1114,10 +1113,7 @@ module std_private_chrono_high_resolution_clock [system] {
}
module std_private_chrono_leap_second [system] { header "__chrono/leap_second.h" }
module std_private_chrono_literals [system] { header "__chrono/literals.h" }
-module std_private_chrono_local_info [system] {
- header "__chrono/local_info.h"
- export std_private_chrono_sys_info
-}
+module std_private_chrono_local_info [system] { header "__chrono/local_info.h" }
module std_private_chrono_month [system] { header "__chrono/month.h" }
module std_private_chrono_month_weekday [system] { header "__chrono/month_weekday.h" }
module std_private_chrono_monthday [system] { header "__chrono/monthday.h" }
@@ -1159,7 +1155,6 @@ module std_private_chrono_year [system] { header "__chrono/yea
module std_private_chrono_year_month [system] { header "__chrono/year_month.h" }
module std_private_chrono_year_month_day [system] { header "__chrono/year_month_day.h" }
module std_private_chrono_year_month_weekday [system] { header "__chrono/year_month_weekday.h" }
-module std_private_chrono_zoned_time [system] { header "__chrono/zoned_time.h" }
module std_private_compare_common_comparison_category [system] { header "__compare/common_comparison_category.h" }
module std_private_compare_compare_partial_order_fallback [system] { header "__compare/compare_partial_order_fallback.h" }
diff --git a/libcxx/modules/std/chrono.inc b/libcxx/modules/std/chrono.inc
index 87e32afbe4bdc..813322a1797f6 100644
--- a/libcxx/modules/std/chrono.inc
+++ b/libcxx/modules/std/chrono.inc
@@ -209,12 +209,13 @@ export namespace std {
using std::chrono::reload_tzdb;
using std::chrono::remote_version;
-# endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&
- // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-
+# if 0
// [time.zone.exception], exception classes
using std::chrono::ambiguous_local_time;
using std::chrono::nonexistent_local_time;
+# endif // if 0
+# endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&
+ // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
// [time.zone.info], information classes
using std::chrono::local_info;
@@ -223,14 +224,18 @@ export namespace std {
# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
!defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if 0
// [time.zone.timezone], class time_zone
using std::chrono::choose;
+# endif // if 0
+
using std::chrono::time_zone;
+# if 0
+
// [time.zone.zonedtraits], class template zoned_traits
using std::chrono::zoned_traits;
-# if 0
// [time.zone.zonedtime], class template zoned_time
using std::chrono::zoned_time;
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 9e6c70335a794..65e6ce2c4da43 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -340,9 +340,6 @@ if (LIBCXX_ENABLE_LOCALIZATION AND LIBCXX_ENABLE_FILESYSTEM AND LIBCXX_ENABLE_TI
include/tzdb/types_private.h
include/tzdb/tzdb_list_private.h
include/tzdb/tzdb_private.h
- # TODO TZDB The exception could be moved in chrono once the TZDB library
- # is no longer experimental.
- chrono_exception.cpp
time_zone.cpp
tzdb.cpp
tzdb_list.cpp
diff --git a/libcxx/src/chrono_exception.cpp b/libcxx/src/chrono_exception.cpp
deleted file mode 100644
index bea2ad110310a..0000000000000
--- a/libcxx/src/chrono_exception.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <chrono>
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-namespace chrono {
-
-_LIBCPP_AVAILABILITY_TZDB
-_LIBCPP_EXPORTED_FROM_ABI nonexistent_local_time::~nonexistent_local_time() = default; // key function
-_LIBCPP_AVAILABILITY_TZDB
-_LIBCPP_EXPORTED_FROM_ABI ambiguous_local_time::~ambiguous_local_time() = default; // key function
-
-} // namespace chrono
-
-_LIBCPP_END_NAMESPACE_STD
diff --git a/li...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/95058
More information about the libcxx-commits
mailing list