mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Caching] Temporarily using llvm style diagnostics in caching
When caching is enabled, using swift style diagnotics can lead to crashes due to some uninitialized variables. Even more, the swift style diagnostics is not going to render the same when replay from the cache since the currect caching diagnostics processor is not capture all information that is needed to render diagnostis from SwiftSyntax. Temprarily using llvm style for caching builds. rdar://127530204
This commit is contained in:
@@ -2172,7 +2172,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
Args.hasFlag(OPT_color_diagnostics,
|
||||
OPT_no_color_diagnostics,
|
||||
/*Default=*/llvm::sys::Process::StandardErrHasColors());
|
||||
// If no style options are specified, default to LLVM style.
|
||||
// If no style options are specified, default to Swift style.
|
||||
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::Swift;
|
||||
if (const Arg *arg = Args.getLastArg(OPT_diagnostic_style)) {
|
||||
StringRef contents = arg->getValue();
|
||||
@@ -2186,6 +2186,9 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Swift style is not fully supported in cached mode yet.
|
||||
if (Args.hasArg(OPT_cache_compile_job))
|
||||
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::LLVM;
|
||||
|
||||
for (const Arg *arg: Args.filtered(OPT_emit_macro_expansion_files)) {
|
||||
StringRef contents = arg->getValue();
|
||||
|
||||
Reference in New Issue
Block a user