[Lldb-commits] [lldb] 44b44bc - [lldb] Correct version -v output for booleans (#174742)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 7 03:03:54 PST 2026
Author: David Spickett
Date: 2026-01-07T11:03:49Z
New Revision: 44b44bc81babc38ac65868691054c25199aea420
URL: https://github.com/llvm/llvm-project/commit/44b44bc81babc38ac65868691054c25199aea420
DIFF: https://github.com/llvm/llvm-project/commit/44b44bc81babc38ac65868691054c25199aea420.diff
LOG: [lldb] Correct version -v output for booleans (#174742)
We were checking whether the structured data value could be got as a
boolean, not what value that boolean had. This meant we were incorrectly
showing "yes" for everything.
Added:
Modified:
lldb/source/Commands/CommandObjectVersion.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandObjectVersion.cpp b/lldb/source/Commands/CommandObjectVersion.cpp
index fb7e399eb7260..a19caca6469ac 100644
--- a/lldb/source/Commands/CommandObjectVersion.cpp
+++ b/lldb/source/Commands/CommandObjectVersion.cpp
@@ -55,7 +55,7 @@ static void dump(const StructuredData::Dictionary &config, Stream &s) {
s << " " << key << ": ";
if (StructuredData::Boolean *boolean = value_sp->GetAsBoolean())
- s << (boolean ? "yes" : "no");
+ s << (boolean->GetValue() ? "yes" : "no");
else if (StructuredData::Array *array = value_sp->GetAsArray())
dump(*array, s);
s << '\n';
More information about the lldb-commits
mailing list