[lld] [lld][ELF] Use the containing symbol, not the referenced symbol, for undefined symbol errors. (PR #70800)

Bevin Hansson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 05:22:16 PDT 2023


bevin-hansson wrote:

> I am nervous if we need to spend these lines of code to give a diagnostic for this case and I'd probably choose not.
> 
> Fortunately, I think we can refactor the existing code (`getEnclosingFunction`) to give this diagnostic improvement with nearly no additional complexity: https://github.com/MaskRay/llvm-project/tree/lld-enclosing-function I haven't added a test yet.

The change in your patch seems reasonable, since we can reuse the existing function for finding the enclosing symbol. Do you want me to transplant those changes into this PR?

https://github.com/llvm/llvm-project/pull/70800


More information about the llvm-commits mailing list