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> {
262
262
void emitVTable () {
263
263
PrettyStackTraceDecl (" silgen emitVTable" , theClass);
264
264
265
- // Imported types don't have vtables right now.
266
- if (theClass->hasClangNode ())
267
- return ;
268
-
269
265
// Populate our list of base methods and overrides.
270
266
visitAncestor (theClass);
271
267
@@ -317,6 +313,10 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
317
313
}
318
314
319
315
void visitAncestor (ClassDecl *ancestor) {
316
+ // Imported types don't have vtables right now.
317
+ if (ancestor->hasClangNode ())
318
+ return ;
319
+
320
320
auto *superDecl = ancestor->getSuperclassDecl ();
321
321
if (superDecl)
322
322
visitAncestor (superDecl);
@@ -1153,8 +1153,10 @@ class SILGenType : public TypeMemberVisitor<SILGenType> {
1153
1153
1154
1154
// Build a vtable if this is a class.
1155
1155
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
+ }
1158
1160
}
1159
1161
1160
1162
// 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