Linker-unified global objects?

Does anyone know where I can find code, or a rule set, which reliably
indicates whether or not two llvm GlobalVariables, or two llvm Functions,
could potentially be unified by the linker based on their attributes such
as linkage-type, visibility, const-ness, 'unnamed_addr`, and initializers?

I’m working on my own AA pass, and it will be unsound if I falsely conclude
that two GlobalVariables or two Functions name distinct pieces of memory,
when in fact that name identical or intersecting regions of memory.
False-positives degrade my precision, but false-negatives make my algorithm

David Majnemer kindly pointed to the method areGlobalsPotentiallyEqual(…)
but it looks like it gives up easily when external or weak linkage is
involved, so I didn’t know if one could do better with a little more effort.

In my case, the current version of clang will always be the front-end, but
the back-end might not be ELF, so I hesitate to draw too many conclusions
just from the GNU assembly I see produced on my system for the little test
cases I come up with.

Note: This is a re-post related to a few threads on llvm-dev, because no
one there seemed to have a definitive answer, and I thought clang folks may
have run into this.