[Frontend] Don't ask to report bugs to us in immediate mode

rdar://81233463
This commit is contained in:
Alexis Laferrière
2021-10-06 11:07:48 -07:00
parent 76260c2235
commit 69ce3ec41f
2 changed files with 18 additions and 0 deletions

View File

@@ -2034,6 +2034,15 @@ int swift::performFrontend(ArrayRef<const char *> Args,
return finishDiagProcessing(1, /*verifierEnabled*/ false);
}
// Don't ask clients to report bugs when running a script in immediate mode.
// When a script asserts the compiler reports the error with the same
// stacktrace as a compiler crash. From here we can't tell which is which,
// for now let's not explicitly ask for bug reports.
if (Invocation.getFrontendOptions().RequestedAction ==
FrontendOptions::ActionType::Immediate) {
llvm::setBugReportMsg(nullptr);
}
PrettyStackTraceFrontend frontendTrace(Invocation.getLangOptions());
// Make an array of PrettyStackTrace objects to dump the configuration files