================ @@ -1084,3 +1084,43 @@ bool lldb_private::formatters::LibcxxWStringViewSummaryProvider( return ::LibcxxWStringSummaryProvider(valobj, stream, summary_options, dataobj, size); } + +bool lldb_private::formatters::LibcxxChronoMonthSummaryProvider( + ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) { + // These are the names used in the C++20 ostream operator. Since LLVM uses + // C++17 it's not possible to use the ostream operator directly. + static const std::array<std::string_view, 12> months = { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December"}; + + unsigned month = valobj.GetChildMemberWithName("__m_")->GetValueAsUnsigned(0); ---------------- Michael137 wrote:
```suggestion const unsigned month = valobj.GetChildMemberWithName("__m_")->GetValueAsUnsigned(0); ``` Also we should probably check that `GetChildMemberWithName` returns a valid pointer https://github.com/llvm/llvm-project/pull/76983 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits