diff options
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 0841b2cef81..07d2b8d19f2 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -76,6 +76,7 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { case RewriteObjC: return new RewriteObjCAction(); case RewriteTest: return new RewriteTestAction(); case RunAnalysis: return new ento::AnalysisAction(); + case MigrateSource: return new arcmt::MigrateSourceAction(); case RunPreprocessorOnly: return new PreprocessOnlyAction(); } llvm_unreachable("Invalid program action!"); @@ -105,12 +106,18 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { break; case FrontendOptions::ARCMT_Migrate: Act = new arcmt::MigrateAction(Act, - FEOpts.ARCMTMigrateDir, + FEOpts.MTMigrateDir, FEOpts.ARCMTMigrateReportOut, FEOpts.ARCMTMigrateEmitARCErrors); break; } + if (FEOpts.ObjCMTAction != FrontendOptions::ObjCMT_None) { + Act = new arcmt::ObjCMigrateAction(Act, FEOpts.MTMigrateDir, + FEOpts.ObjCMTAction & ~FrontendOptions::ObjCMT_Literals, + FEOpts.ObjCMTAction & ~FrontendOptions::ObjCMT_Subscripting); + } + // If there are any AST files to merge, create a frontend action // adaptor to perform the merge. if (!FEOpts.ASTMergeFiles.empty()) |