From 2978d026819b82f77eef42d92b3b53919f375bd8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 11 Apr 2022 12:52:31 +0200 Subject: [Clang] Remove support for legacy pass manager This removes the -flegacy-pass-manager and -fno-experimental-new-pass-manager options, and the corresponding support code in BackendUtil. The -fno-legacy-pass-manager and -fexperimental-new-pass-manager options are retained as no-ops. Differential Revision: https://reviews.llvm.org/D123609 --- clang/lib/Frontend/CompilerInvocation.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 87e613a..369295d 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -543,11 +543,6 @@ static bool FixupInvocation(CompilerInvocation &Invocation, << A->getSpelling() << T.getTriple(); } - if (!CodeGenOpts.ProfileRemappingFile.empty() && CodeGenOpts.LegacyPassManager) - Diags.Report(diag::err_drv_argument_only_allowed_with) - << Args.getLastArg(OPT_fprofile_remapping_file_EQ)->getAsString(Args) - << "-fno-legacy-pass-manager"; - return Diags.getNumErrors() == NumErrorsBefore; } @@ -1731,10 +1726,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, // -ftime-report= is only for new pass manager. if (A->getOption().getID() == OPT_ftime_report_EQ) { - if (Opts.LegacyPassManager) - Diags.Report(diag::err_drv_argument_only_allowed_with) - << A->getAsString(Args) << "-fno-legacy-pass-manager"; - StringRef Val = A->getValue(); if (Val == "per-pass") Opts.TimePassesPerRun = false; -- cgit v1.1