Skip to content

Commit 4623177

Browse files
committed
[embedded] Don't remove functions from the zombie list in DropAllSIL
1 parent 05dc240 commit 4623177

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,6 +2205,11 @@ void IRGenerator::emitObjCActorsNeedingSuperclassSwizzle() {
22052205
/// from other modules. This happens e.g. if a public class contains a (dead)
22062206
/// private method.
22072207
void IRGenModule::emitVTableStubs() {
2208+
if (getSILModule().getOptions().DropAllSILAfterSerialization) {
2209+
// We're asked to emit an empty IR module
2210+
return;
2211+
}
2212+
22082213
llvm::Function *stub = nullptr;
22092214
for (auto I = getSILModule().zombies_begin();
22102215
I != getSILModule().zombies_end(); ++I) {

lib/SILOptimizer/UtilityPasses/DropAllSILPass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class DropAllSILPass : public SILModuleTransform {
4444
for (SILFunction *F : FunctionsToErase) {
4545
notifyWillDeleteFunction(F);
4646
M.eraseFunction(F);
47-
M.removeFromZombieList(F->getName());
4847
}
4948

5049
for (SILGlobalVariable *G : GlobalsToErase) {

0 commit comments

Comments
 (0)