[Lldb-commits] [lldb] [lldb] Correct version -v output for booleans (PR #174742)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 7 02:57:27 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: David Spickett (DavidSpickett)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/174742.diff


1 Files Affected:

- (modified) lldb/source/Commands/CommandObjectVersion.cpp (+1-1) 


``````````diff
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';

``````````

</details>


https://github.com/llvm/llvm-project/pull/174742


More information about the lldb-commits mailing list