[llvm] [TargetLowering][COFF] Only check shouldAssumeDSOLocal on GlobalVariable in lowerRelativeReference (PR #225160)

Andy Lim via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 13:06:13 PDT 2026


andysjlim wrote:

> This handling is not theoretically sound, I think. If you refer to a dllimport function from a global like this, you get some pointer, but not _the_ pointer (which is unique across the whole program). We probably need something like dso_local_equivalent (https://llvm.org/docs/LangRef.html#dso-local-equivalent).
> 
> But I'm okay with taking this as a quick fix if you leave a FIXME explaining the issue.

Thank you so much for the review. Makes sense, and I've added a FIXME explaining the pointer identity issue and referencing dso_local_equivalent as the long-term solution. Thanks again!

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


More information about the llvm-commits mailing list