Skip to content

Commit 9ffe12d

Browse files
committed
SIL: Better error when linker finds SILGen did not emit a conformance
I hit this assert a few times while working on making conformance emission lazier, so let's at least print out the missing conformance in question.
1 parent 39335f4 commit 9ffe12d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/SIL/Linker.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,14 @@ void SILLinkerVisitor::visitProtocolConformance(
217217
// If the looked up witness table is a declaration, there is nothing we can
218218
// do here.
219219
if (WT == nullptr || WT->isDeclaration()) {
220-
assert(!mustDeserialize &&
221-
"unable to deserialize witness table when we must?!");
220+
#ifndef NDEBUG
221+
if (mustDeserialize) {
222+
llvm::errs() << "SILGen failed to emit required conformance:\n";
223+
ref.dump(llvm::errs());
224+
llvm::errs() << "\n";
225+
abort();
226+
}
227+
#endif
222228
return;
223229
}
224230

0 commit comments

Comments
 (0)