This is an archive of the discontinued LLVM Phabricator instance.

Fix NameAnonFunctions pass: for ThinLTO we need to rename global variables as well
ClosedPublic

Authored by mehdi_amini on Sep 15 2016, 5:24 PM.

Details

Summary

A follow-up patch will rename this pass and the source file accordingly,
but I figured the non-NFC change will be easier to spot in isolation.

Diff Detail

Event Timeline

mehdi_amini retitled this revision from to Fix NameAnonFunctions pass: for ThinLTO we need to rename global variables as well.
mehdi_amini updated this object.
mehdi_amini added a reviewer: tejohnson.
mehdi_amini added a subscriber: llvm-commits.
pcc added a subscriber: pcc.Sep 15 2016, 5:29 PM

Do aliases and ifuncs also need to be renamed? I know that at least unnamed aliases are legal (rL239921) but I don't know about ifuncs.

In D24641#544320, @pcc wrote:

Do aliases and ifuncs also need to be renamed? I know that at least unnamed aliases are legal (rL239921) but I don't know about ifuncs.

I didn't know alias could be unnamed, reminds me that I need to fix the alias representation (and forbid unnamed at the same time).

So now I need another iterator for all Module globalvalues... ;)

I feel ifunc would break ThinLTO, I don't remember seeing any test for that (I'm not sure they work on MachO either).

Handle unnamed aliases as well

tejohnson accepted this revision.Sep 15 2016, 9:19 PM
tejohnson edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 15 2016, 9:19 PM
This revision was automatically updated to reflect the committed changes.