[Lldb-commits] [lldb] [LLDB] Consolidate C++ string buffer summaries (PR #144258)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 16 10:36:52 PDT 2025
================
@@ -214,3 +198,76 @@ bool lldb_private::formatters::WCharSummaryProvider(
}
return true;
}
+
+std::optional<uint64_t>
+lldb_private::formatters::GetWCharByteSize(Target &target) {
+ TypeSystemClangSP scratch_ts_sp =
+ ScratchTypeSystemClang::GetForTarget(target);
+ if (!scratch_ts_sp)
+ return {};
+
+ return llvm::expectedToOptional(
+ scratch_ts_sp->GetBasicType(lldb::eBasicTypeWChar).GetByteSize(nullptr));
+}
+
+template <StringPrinter::StringElementType element_type>
+bool lldb_private::formatters::StringBufferSummaryProvider(
+ Stream &stream, const TypeSummaryOptions &summary_options,
+ lldb::ValueObjectSP location_sp, uint64_t size, std::string prefix_token) {
+
+ if (size == 0) {
----------------
Michael137 wrote:
Ah i see, this is where the tests get fixed
https://github.com/llvm/llvm-project/pull/144258
More information about the lldb-commits
mailing list