Skip to content

Commit 9a40305

Browse files
committed
SIL Linker: Remove redundant code from linkInVTable()
SILModule::lookUpVTable() already deserializes the vtable if necessary, we don't have to do it again here.
1 parent 54e608a commit 9a40305

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/SIL/Linker.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ bool SILLinkerVisitor::processFunction(SILFunction *F) {
6262
bool SILLinkerVisitor::linkInVTable(ClassDecl *D) {
6363
// Attempt to lookup the Vtbl from the SILModule.
6464
SILVTable *Vtbl = Mod.lookUpVTable(D);
65-
66-
// If the SILModule does not have the VTable, attempt to deserialize the
67-
// VTable. If we fail to do that as well, bail.
68-
if (!Vtbl || !(Vtbl = Loader->lookupVTable(D->getName())))
65+
if (!Vtbl)
6966
return false;
7067

7168
// Ok we found our VTable. Visit each function referenced by the VTable. If

0 commit comments

Comments
 (0)