From: Argyrios Kyrtzidis Date: Wed, 13 Nov 2013 23:38:17 +0000 (+0000) Subject: [objcmt] If the frontend option is frontend::MigrateSource then we don't need to... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1576c10c62562a3e1405c5d684dc64671ba03f9;p=clang [objcmt] If the frontend option is frontend::MigrateSource then we don't need to create the arcmt wrappers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194627 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 5192ea7949..d755839c0f 100644 --- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -141,27 +141,29 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { #endif #ifdef CLANG_ENABLE_ARCMT - // Potentially wrap the base FE action in an ARC Migrate Tool action. - switch (FEOpts.ARCMTAction) { - case FrontendOptions::ARCMT_None: - break; - case FrontendOptions::ARCMT_Check: - Act = new arcmt::CheckAction(Act); - break; - case FrontendOptions::ARCMT_Modify: - Act = new arcmt::ModifyAction(Act); - break; - case FrontendOptions::ARCMT_Migrate: - Act = new arcmt::MigrateAction(Act, - FEOpts.MTMigrateDir, - FEOpts.ARCMTMigrateReportOut, - FEOpts.ARCMTMigrateEmitARCErrors); - break; - } + if (CI.getFrontendOpts().ProgramAction != frontend::MigrateSource) { + // Potentially wrap the base FE action in an ARC Migrate Tool action. + switch (FEOpts.ARCMTAction) { + case FrontendOptions::ARCMT_None: + break; + case FrontendOptions::ARCMT_Check: + Act = new arcmt::CheckAction(Act); + break; + case FrontendOptions::ARCMT_Modify: + Act = new arcmt::ModifyAction(Act); + break; + case FrontendOptions::ARCMT_Migrate: + Act = new arcmt::MigrateAction(Act, + FEOpts.MTMigrateDir, + FEOpts.ARCMTMigrateReportOut, + FEOpts.ARCMTMigrateEmitARCErrors); + break; + } - if (FEOpts.ObjCMTAction != FrontendOptions::ObjCMT_None) { - Act = new arcmt::ObjCMigrateAction(Act, FEOpts.MTMigrateDir, - FEOpts.ObjCMTAction); + if (FEOpts.ObjCMTAction != FrontendOptions::ObjCMT_None) { + Act = new arcmt::ObjCMigrateAction(Act, FEOpts.MTMigrateDir, + FEOpts.ObjCMTAction); + } } #endif