mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Frontend: Fix crash when -stats-output-dir used with -typecheck-module-from-interface
There's no ASTContext in this case, so we just skip initializing stats if the driver passes this flag down to us.
This commit is contained in:
@@ -563,7 +563,9 @@ bool CompilerInstance::setup(const CompilerInvocation &Invoke,
|
||||
return true;
|
||||
}
|
||||
|
||||
setupStatsReporter();
|
||||
if (hasASTContext()) {
|
||||
setupStatsReporter();
|
||||
}
|
||||
|
||||
if (setupDiagnosticVerifierIfNeeded()) {
|
||||
Error = "Setting up diagnostics verifier failed";
|
||||
|
||||
Reference in New Issue
Block a user