[Lldb-commits] [lldb] [lldb-dap] Implement value locations for function pointers (PR #104589)
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 17 08:49:56 PDT 2024
================
@@ -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
More information about the lldb-commits
mailing list