================
@@ -191,16 +191,6 @@ void CommandObjectDWIMPrint::DoExecute(StringRef command,
}
}
- // Second, try `expr` as a persistent variable.
- if (expr.starts_with("$"))
- if (auto *state = target.GetPersistentExpressionStateForLanguage(
- language.AsLanguageType()))
- if (auto var_sp = state->GetVariable(expr))
- if (auto valobj_sp = var_sp->GetValueObject()) {
- dump_val_object(*valobj_sp);
- return;
- }
-
----------------
hawkinsw wrote:
Great question!! The _goal_ was that that first case would now subsume this
case (From @jimingham 's suggestion on the related PR #215650).
My first reaction to your comment was, "The first case subsumes this case!!".
But, you really spurred me to think deeper and ... I _think_ that we will still
need this case.
I am still chewing on this thought, but here's my current reasoning:
1. Again, the goal was for Case 1/2 to merge.
2. But, Case 1 explicitly "passes" on paths that would require non-simple DIL
evaluation.
3. So, if the user executes, say, `dwim-print $1->field`, then Case 1 would not
be executed and having Case 2 would still be important.
TL;DR: Thank you for spurring me to think deeper. I am going to respin another
version of the PR that adds Case 2 back and adjusts the comments to include
(something like) what I wrote above.
Does that seem reasonable?
https://github.com/llvm/llvm-project/pull/215706
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits