This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Clear dllimport when setting dso_local
ClosedPublic

Authored by espindola on Mar 12 2018, 10:55 AM.

Details

Summary

This is PR36686.

If a user of a library is LTOed with that library we take the opportunity to set dso_local, but we don't clear dllimport, which creates an invalid IR.

Diff Detail

Event Timeline

espindola created this revision.Mar 12 2018, 10:55 AM

Looks reasonable to me.
(I think Teresa / Peter are more appropriate people to give a final approvement).

tejohnson accepted this revision.Mar 13 2018, 6:54 AM

LGTM, but what about the regular LTO case (i.e. we set this directly on the GV in LTO.cpp, instead of on the summary and then propagating in the backends here for ThinLTO)?

This revision is now accepted and ready to land.Mar 13 2018, 6:54 AM

Teresa Johnson via Phabricator via llvm-commits
<llvm-commits@lists.llvm.org> writes:

tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM, but what about the regular LTO case (i.e. we set this directly on the GV in LTO.cpp, instead of on the summary and then propagating in the backends here for ThinLTO)?

The regular lib/Linker code already handles this.

Cheers,
Rafael