Skip to content

Commit 4951e9d

Browse files
committed
[DFE] Default overrides are alive.
They are used externally and can't be eliminated as dead when there are no uses from SIL (of which in fact there never are any).
1 parent 1c3073b commit 4951e9d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/SILOptimizer/IPO/DeadFunctionElimination.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,14 @@ class DeadFunctionAndGlobalElimination {
643643
}
644644
}
645645
}
646+
647+
// Check default override tables.
648+
for (auto &table : Module->getDefaultOverrideTableList()) {
649+
for (auto &entry : table.getEntries()) {
650+
ensureAlive(entry.impl);
651+
}
652+
}
653+
646654
// Check property descriptor implementations.
647655
for (SILProperty &P : Module->getPropertyList()) {
648656
if (auto component = P.getComponent()) {

0 commit comments

Comments
 (0)