Skip to content

Commit 55dd1c7

Browse files
committed
SILGen: Small cleanup for SILGenVTable
1 parent 07c8b1b commit 55dd1c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/SILGen/SILGenType.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,17 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
277277
IsSerialized_t serialized = IsNotSerialized;
278278
auto classIsPublic = theClass->getEffectiveAccess() >= AccessLevel::Public;
279279
// Only public, fixed-layout classes should have serialized vtables.
280-
if (classIsPublic && !theClass->isResilient())
280+
if (classIsPublic && !isResilient)
281281
serialized = IsSerialized;
282282

283283
// Finally, create the vtable.
284284
SILVTable::create(SGM.M, theClass, serialized, vtableEntries);
285285
}
286286

287287
void visitAncestor(ClassDecl *ancestor) {
288-
auto superTy = ancestor->getSuperclass();
289-
if (superTy)
290-
visitAncestor(superTy->getClassOrBoundGenericClass());
288+
auto *superDecl = ancestor->getSuperclassDecl();
289+
if (superDecl)
290+
visitAncestor(superDecl);
291291

292292
addVTableEntries(ancestor);
293293
}

0 commit comments

Comments
 (0)