This is an archive of the discontinued LLVM Phabricator instance.

Don't speculatively emit VTTs for classes unless we are able to correctly emit references to all the functions they will (directly or indirectly) reference.
ClosedPublic

Authored by rsmith on Nov 20 2018, 12:22 PM.

Details

Summary

This fixes a miscompile where we'd emit a VTT for a class that ends up
referencing an inline virtual member function that we can't actually
emit a body for (because we never instantiated it in the current TU),
which in a corner case of a corner case can lead to link errors.

Diff Detail

Repository
rC Clang

Event Timeline

rsmith created this revision.Nov 20 2018, 12:22 PM
rjmccall accepted this revision.Nov 20 2018, 2:34 PM

LGTM.

This revision is now accepted and ready to land.Nov 20 2018, 2:34 PM
This revision was automatically updated to reflect the committed changes.