Skip to content

Commit cff79e6

Browse files
committed
[Assertions] Provide the flag to dodge the "type reconstruction" assertions.
When the compiler aborts due to a type reconstruction error, ask the user to submit a bug report and provide the flag needed to disable this check.
1 parent dd55791 commit cff79e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,9 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
921921
Ty->dump(llvm::errs());
922922
if (Sig)
923923
llvm::errs() << "Generic signature: " << Sig << "\n";
924+
llvm::errs() << SWIFT_CRASH_BUG_REPORT_MESSAGE << "\n"
925+
<< "Pass '-Xfrontend -disable-round-trip-debug-types' to disable "
926+
"this assertion.\n";
924927
abort();
925928
} else if (!Reconstructed->isEqual(Ty) &&
926929
// FIXME: Some existential types are reconstructed without
@@ -935,6 +938,9 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
935938
Reconstructed->dump(llvm::errs());
936939
if (Sig)
937940
llvm::errs() << "Generic signature: " << Sig << "\n";
941+
llvm::errs() << SWIFT_CRASH_BUG_REPORT_MESSAGE << "\n"
942+
<< "Pass '-Xfrontend -disable-round-trip-debug-types' to disable "
943+
"this assertion.\n";
938944
abort();
939945
}
940946
}

0 commit comments

Comments
 (0)