[Serialization] Add whether allowing errors to the pretty stack output

It's currently not obvious in crash reports whether compiling with
errors is enabled or not. Since this option can make previously
"impossible" paths now possible, add a message to both the pretty stack
output and fatal deserialization diagnostics to point out that it is
enabled.
This commit is contained in:
Ben Barham
2021-05-18 14:36:07 +10:00
parent b9a97586c3
commit cbbc29ba62
7 changed files with 62 additions and 5 deletions

View File

@@ -2046,6 +2046,11 @@ int swift::performFrontend(ArrayRef<const char *> Args,
return finishDiagProcessing(1, /*verifierEnabled*/ false);
}
Optional<llvm::PrettyStackTraceString> allowErrorsStackTrace;
if (Invocation.getFrontendOptions().AllowModuleWithCompilerErrors)
allowErrorsStackTrace.emplace("While allowing modules with compiler errors "
"enabled");
// Make an array of PrettyStackTrace objects to dump the configuration files
// we used to parse the arguments. These are RAII objects, so they and the
// buffers they refer to must be kept alive in order to be useful. (That is,