[Lldb-commits] [lldb] [lldb] Correct spacing of = {...} when depth limit is hit (PR #149480)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 18 02:01:10 PDT 2025
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/149480
In some places it was printing "= {...}" and some "={...}" with no space. I think the space looks nicer so do that in both cases.
>From 3c6241d1ed5e5b8d8c86447a98bed2f407f50ffb Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Fri, 18 Jul 2025 08:59:07 +0000
Subject: [PATCH] [lldb] Correct spacing of {...} when depth limit is hit
In some places it was printing "= {...}" and some "={...}"
with no space. I think the space looks nicer so do that
in both cases.
---
lldb/source/DataFormatters/ValueObjectPrinter.cpp | 2 +-
.../TestFrameVarDepthAndElemCount.py | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
index 40493df8aec37..05fcc4db3b125 100644
--- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -854,7 +854,7 @@ llvm::Error ValueObjectPrinter::PrintChildrenIfNeeded(bool value_printed,
PrintChildren(value_printed, summary_printed, curr_ptr_depth);
} else if (HasReachedMaximumDepth() && IsAggregate() &&
ShouldPrintValueObject()) {
- m_stream->PutCString("{...}\n");
+ m_stream->PutCString(" {...}\n");
// The maximum child depth has been reached. If `m_max_depth` is the default
// (i.e. the user has _not_ customized it), then lldb presents a warning to
// the user. The warning tells the user that the limit has been reached, but
diff --git a/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py b/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
index 1dfd7df9ff1be..33648678da797 100644
--- a/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
+++ b/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
@@ -19,10 +19,10 @@ def test(self):
self.expect(
"frame var --depth 2 --element-count 5 -- c",
substrs=[
- "[0] = {\n b ={...}\n }",
- "[1] = {\n b ={...}\n }",
- "[2] = {\n b ={...}\n }",
- "[3] = {\n b ={...}\n }",
- "[4] = {\n b ={...}\n }",
+ "[0] = {\n b = {...}\n }",
+ "[1] = {\n b = {...}\n }",
+ "[2] = {\n b = {...}\n }",
+ "[3] = {\n b = {...}\n }",
+ "[4] = {\n b = {...}\n }",
],
)
More information about the lldb-commits
mailing list