DeadFunctionElimination: don’t eliminate public methods which are called via a thunk.

For this we need to store the linkage of the “original” method implementation in the vtable.
Otherwise DeadFunctionElimination thinks that the method implementation is not public but private (which is the linkage of the thunk).

The big part of this change is to extend SILVTable to store the linkage (+ serialization, printing, etc.).

fixes rdar://problem/29841635
This commit is contained in:
Erik Eckstein
2017-01-06 15:36:18 -08:00
parent 7d427aa62e
commit 1eb3a0532b
20 changed files with 193 additions and 112 deletions

View File

@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
/// in source control, you should also update the comment to briefly
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
const uint16_t VERSION_MINOR = 304; // Last change: Archetype generic env
const uint16_t VERSION_MINOR = 305; // Last change: linkage in SILVTable::Entry
using DeclID = PointerEmbeddedInt<unsigned, 31>;
using DeclIDField = BCFixed<31>;