File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -262,10 +262,6 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
262262 void emitVTable () {
263263 PrettyStackTraceDecl (" silgen emitVTable" , theClass);
264264
265- // Imported types don't have vtables right now.
266- if (theClass->hasClangNode ())
267- return ;
268-
269265 // Populate our list of base methods and overrides.
270266 visitAncestor (theClass);
271267
@@ -317,6 +313,10 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
317313 }
318314
319315 void visitAncestor (ClassDecl *ancestor) {
316+ // Imported types don't have vtables right now.
317+ if (ancestor->hasClangNode ())
318+ return ;
319+
320320 auto *superDecl = ancestor->getSuperclassDecl ();
321321 if (superDecl)
322322 visitAncestor (superDecl);
@@ -1153,8 +1153,10 @@ class SILGenType : public TypeMemberVisitor<SILGenType> {
11531153
11541154 // Build a vtable if this is a class.
11551155 if (auto theClass = dyn_cast<ClassDecl>(theType)) {
1156- SILGenVTable genVTable (SGM, theClass);
1157- genVTable.emitVTable ();
1156+ if (!theClass->hasClangNode ()) {
1157+ SILGenVTable genVTable (SGM, theClass);
1158+ genVTable.emitVTable ();
1159+ }
11581160 }
11591161
11601162 // If this is a nominal type that is move only, emit a deinit table for it.
You can’t perform that action at this time.
0 commit comments