DmT021 wrote:

> We should always prefer symbols from the current module first, probably 
> external first, then fall back to internal. If we do a search of all modules, 
> we should prefer external symbols first and then internal, but only if they 
> are unique.

So it's `current module external, current module internal, other modules 
external, other modules internal`, right? This is how 
[SymbolContext.cpp](https://github.com/llvm/llvm-project/pull/102835/files#diff-da1a374f5098c39acfebae4b87a261f143a842e613082c2296de7ee28df12a33)
 implements it.
What if we use `SymbolContext::FindBestGlobalDataSymbol` and 
`SymbolContext::FindBestFunction` (a new function*) in 
`IRExecutionUnit::FindInSymbols`? This way we can simplify LoadAddressResolver 
by removing all this logic about tracking internal symbols.

\* `SymbolContext::FindBestFunction` will use the same lookup order but search 
functions instead of symbols.

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