This is an archive of the discontinued LLVM Phabricator instance.

Instructions: add missing anchors. NFC
ClosedPublic

Authored by thegameg on Dec 13 2015, 7:45 AM.

Details

Summary

ICmpInst, GetElementPtrInst and PHINode have no anchor functions. This causes the vtable and the type info (if RTTI is enabled in user code) to be emitted in multiple translation units.

Before 3.7, the destructors were the key functions for these nodes, but they have been removed.

There have been discussions about this here: http://lists.llvm.org/pipermail/llvm-dev/2015-August/089010.html and here: http://lists.llvm.org/pipermail/llvm-dev/2015-December/092921.html.

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg updated this revision to Diff 42661.Dec 13 2015, 7:45 AM
thegameg retitled this revision from to Instructions: add missing anchors.
thegameg updated this object.
thegameg set the repository for this revision to rL LLVM.
thegameg changed the visibility from "Public (No Login Required)" to "thegameg (Francis Visoiu Mistrih)".
thegameg retitled this revision from Instructions: add missing anchors to Instructions: add missing anchors. NFC.Dec 13 2015, 8:00 AM
thegameg updated this object.
thegameg added reviewers: sanjoy, pete, dblaikie.
thegameg changed the visibility from "thegameg (Francis Visoiu Mistrih)" to "Public (No Login Required)".
thegameg added a subscriber: llvm-commits.
pete accepted this revision.Dec 14 2015, 9:30 AM
pete edited edge metadata.

Thanks for doing this. Makes sense as per the coding guidelines.

LGTM.

This revision is now accepted and ready to land.Dec 14 2015, 9:30 AM

Thanks for the review. I don't have commit rights, can you commit this for me?

pete added a comment.Dec 14 2015, 12:33 PM

Sure. Committed it as r255538.

Thanks again for the fix
Pete

thegameg closed this revision.Dec 14 2015, 2:44 PM

Thank you!