Skip to content

Commit 71412d3

Browse files
committed
[NFC] SILGen: Name operation.
And prepare to reuse it.
1 parent ea0387a commit 71412d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/SILGen/SILGenType.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,13 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
272272
isResilient = theClass->isResilient();
273273
}
274274

275+
/// Populate our list of base methods and overrides.
276+
void collectMethods() { visitAncestor(theClass); }
277+
275278
void emitVTable() {
276279
PrettyStackTraceDecl("silgen emitVTable", theClass);
277280

278-
// Populate our list of base methods and overrides.
279-
visitAncestor(theClass);
281+
collectMethods();
280282

281283
SmallVector<SILVTable::Entry, 8> vtableEntries;
282284
vtableEntries.reserve(vtableMethods.size() + 2);

0 commit comments

Comments
 (0)