There is an issue with representing opaque types in LLVM IR modules: if two
modules are using the same opaque type (which is only going to be
specialised at some later stage), it is only identified by its name. But
the current module linker “resolves” this as if there is a name clash, and
one of that opaque types is renamed. It contradicts an intuitively expected
identifier behaviour and makes it literally impossible to use opaque types
for identifying underspecified types across different modules.
Our position is that structure type names should be treated as proper
identifiers, as long as types are structurally equivalent, and all the
opaque types are structurally equivalent unless they’re specialised.
Could anyone familiar with the linker comment please?
This is the problem I am having as well.