From c4a019747c98ad9326a675d3cb5a70311ba170a2 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 30 Jan 2025 05:32:25 +0100 Subject: [Clang] Remove ARCMigrate (#119269) In the discussion around #116792, @rjmccall mentioned that ARCMigrate has been obsoleted and that we could go ahead and remove it from Clang, so this patch does just that. --- .../lib/FrontendTool/ExecuteCompilerInvocation.cpp | 39 +--------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp') diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 3f95a1e..079bcd9 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#include "clang/ARCMigrate/ARCMTActions.h" #include "clang/CodeGen/CodeGenAction.h" #include "clang/Config/config.h" #include "clang/Driver/Options.h" @@ -131,12 +130,6 @@ CreateFrontendBaseAction(CompilerInstance &CI) { #else case RewriteObjC: Action = "RewriteObjC"; break; #endif -#if CLANG_ENABLE_ARCMT - case MigrateSource: - return std::make_unique(); -#else - case MigrateSource: Action = "MigrateSource"; break; -#endif #if CLANG_ENABLE_STATIC_ANALYZER case RunAnalysis: return std::make_unique(); #else @@ -147,8 +140,7 @@ CreateFrontendBaseAction(CompilerInstance &CI) { return std::make_unique(); } -#if !CLANG_ENABLE_ARCMT || !CLANG_ENABLE_STATIC_ANALYZER \ - || !CLANG_ENABLE_OBJC_REWRITER +#if !CLANG_ENABLE_STATIC_ANALYZER || !CLANG_ENABLE_OBJC_REWRITER CI.getDiagnostics().Report(diag::err_fe_action_not_available) << Action; return 0; #else @@ -169,35 +161,6 @@ CreateFrontendAction(CompilerInstance &CI) { Act = std::make_unique(std::move(Act)); } -#if CLANG_ENABLE_ARCMT - if (CI.getFrontendOpts().ProgramAction != frontend::MigrateSource && - CI.getFrontendOpts().ProgramAction != frontend::GeneratePCH) { - // 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 = std::make_unique(std::move(Act)); - break; - case FrontendOptions::ARCMT_Modify: - Act = std::make_unique(std::move(Act)); - break; - case FrontendOptions::ARCMT_Migrate: - Act = std::make_unique(std::move(Act), - FEOpts.MTMigrateDir, - FEOpts.ARCMTMigrateReportOut, - FEOpts.ARCMTMigrateEmitARCErrors); - break; - } - - if (FEOpts.ObjCMTAction != FrontendOptions::ObjCMT_None) { - Act = std::make_unique(std::move(Act), - FEOpts.MTMigrateDir, - FEOpts.ObjCMTAction); - } - } -#endif - // Wrap the base FE action in an extract api action to generate // symbol graph as a biproduct of compilation (enabled with // --emit-symbol-graph option) -- cgit v1.1