mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Migrator] Make performing a fix-it run return the instance used
This CompilerInstance will be used if a fix-it run created an error-free AST that we can continue to use in the AST passes. rdar://problem/31926195
This commit is contained in:
@@ -517,9 +517,8 @@ static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
|
||||
|
||||
ASTContext &Context = Instance->getASTContext();
|
||||
|
||||
if (!Context.hadError() &&
|
||||
Invocation.getMigratorOptions().shouldRunMigrator()) {
|
||||
migrator::updateCodeAndEmitRemap(*Instance, Invocation);
|
||||
if (Invocation.getMigratorOptions().shouldRunMigrator()) {
|
||||
migrator::updateCodeAndEmitRemap(Instance.get(), Invocation);
|
||||
}
|
||||
|
||||
if (Action == FrontendOptions::REPL) {
|
||||
|
||||
Reference in New Issue
Block a user