================
@@ -1611,16 +1624,17 @@ void request_evaluate(const llvm::json::Object
&request) {
VariableDescription desc(value);
EmplaceSafeString(body, "result", desc.GetResult(context));
EmplaceSafeString(body, "type", desc.display_type_name);
- if (value.MightHaveChildren()) {
- auto variableReference = g_dap.variables.InsertVariable(
- value, /*is_permanent=*/context == "repl");
- body.try_emplace("variablesReference", variableReference);
- } else {
+ auto var_ref = g_dap.variables.InsertVariable(
+ value, /*is_permanent=*/context == "repl");
----------------
walter-erquinigo wrote:
Instead of unconditionally creating the var_ref, why don't you create a small
lambda that creates it just when needed (lines 1630 and 1637)?
https://github.com/llvm/llvm-project/pull/104589
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits