This is an archive of the discontinued LLVM Phabricator instance.

Linker: Disallow linking appending globals with different addrspaces
ClosedPublic

Authored by arsenm on Dec 21 2022, 9:49 AM.

Details

Reviewers
nikic
MaskRay
Summary

The current appending linkage handling implicitly assumes this by
using a basic ConstantExpr::getBitCast to resolve type
mismatches. Avoid this edge case so we don't need to keep the type
mismatch replacement code around after opaque pointers.

Diff Detail

Event Timeline

arsenm created this revision.Dec 21 2022, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 9:49 AM
arsenm requested review of this revision.Dec 21 2022, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 9:49 AM
Herald added a subscriber: wdng. · View Herald Transcript
nikic accepted this revision.Dec 21 2022, 11:31 AM

LGTM, this just makes the existing limitation explicit, and I don't think there's a point in supporting this without some use-case.

This revision is now accepted and ready to land.Dec 21 2022, 11:31 AM