This is an archive of the discontinued LLVM Phabricator instance.

Don't pass ForDefinition_t in places it is redundant.
ClosedPublic

Authored by espindola on Feb 5 2018, 11:31 AM.

Details

Summary

I found this while looking at the ppc failures caused by the dso_local change.

The issue was that the patch would produce the wrong answer for available_externally. Having ForDefinition_t available in places where the code can just check the linkage is a bit of a foot gun.

This patch removes the ForDefiniton_t argument in places where the linkage is already know.

Diff Detail

Event Timeline

espindola created this revision.Feb 5 2018, 11:31 AM
rnk accepted this revision.Feb 7 2018, 10:35 AM

lgtm

I'm guessing things were structured this way so that a function definition could have its visibility set before giving it a body, i.e. it would look like a declaration, but the visibility should be "for a definition". If everything works I suppose we don't do that anymore.

This revision is now accepted and ready to land.Feb 7 2018, 10:35 AM