DmT021 wrote:

> Don't let us hold this patch up if returning the the original patch that 
> fixes things makes things work if you can't easily get the same functionality 
> from this version of the patch. Will one part of this patch work with the new 
> stuff and the other part not? If so, maybe we allow the place that works use 
> the new functionality and just hard code the other one?

The current version of the patch does archive the desired result (no redundant 
scan of the current module) and all the tests are green. But the issue is it's 
awfully complex. All this callback logic is hard to read and even harder to 
modify next time. Especially in `SymbolContext`.
I'd prefer a slightly repetitive approach. At each lookup function (in this 
case `SymbolContext::FindBestGlobalDataSymbol` and 
`IRExecutionUnit::FindInSymbols`):
- check the current module
- if no suitable result is found:
  - get a copy of ModuleList and remove `current module` from it
  - search through the copy.
  
But I don't insist; if you're ok with this implementation, I'm ok too.

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

Reply via email to