llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Augusto Noronha (augusto2112)

<details>
<summary>Changes</summary>

UpdateFormatsIfNeeded has hardcoded the call to GetFormat with no dynamic 
values. GetFormat will try to find the synthetic children of the ValueObject, 
and passing the wrong one can fail, which can be bad for performance but should 
not be user visible. Fix the performace bug by passing the dynamic value type 
of the ValueObject.

rdar://122506593

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


1 Files Affected:

- (modified) lldb/source/Core/ValueObject.cpp (+1-1) 


``````````diff
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 1443d9dfc3280..c5c434a941b34 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -216,7 +216,7 @@ bool ValueObject::UpdateFormatsIfNeeded() {
     m_last_format_mgr_revision = DataVisualization::GetCurrentRevision();
     any_change = true;
 
-    SetValueFormat(DataVisualization::GetFormat(*this, eNoDynamicValues));
+    SetValueFormat(DataVisualization::GetFormat(*this, GetDynamicValueType()));
     SetSummaryFormat(
         DataVisualization::GetSummaryFormat(*this, GetDynamicValueType()));
     SetSyntheticChildren(

``````````

</details>


https://github.com/llvm/llvm-project/pull/93262
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to