This is an archive of the discontinued LLVM Phabricator instance.

Fix Linker instruction rewrites for modules with identical types
Needs ReviewPublic

Authored by klickverbot on Jun 7 2015, 10:42 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This fixes a severe bug in llvm::Linker that occurs when a type is actually represented by the same Type object in the two modules (as in, the pointers are equal).

Previously, only the top-level type was added to the MappedTypes in that case. If the contained types did not appear in another artifact on their own, this led the instruction rewrites, etc. that are run later to erroneously assume that they need to make changes.

I'm not quite sure what the easiest way to add a regression test for this would be, i.e. how to best get the LLVM command line tools to use the same Type instance.

Diff Detail

Repository
rL LLVM

Event Timeline

klickverbot retitled this revision from to Fix Linker instruction rewrites for modules with identical types.
klickverbot updated this object.
klickverbot edited the test plan for this revision. (Show Details)
klickverbot set the repository for this revision to rL LLVM.
klickverbot added a reviewer: void.
klickverbot added a subscriber: Unknown Object (MLST).
klickverbot updated this object.Jun 7 2015, 10:45 AM
Kai added a subscriber: Kai.Jun 7 2015, 11:15 PM
void removed a reviewer: void.Apr 17 2018, 2:23 PM