From d8a8e5d6240a1db809cd95106910358e69bbf299 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 25 Feb 2021 08:47:59 +0100 Subject: [clang][cli] Remove marshalling from Opt{In,Out}FFlag We can now express all marshalling semantics in `Opt{In,Out}FFlag` via `BoolFOption`. This patch moves remaining `Opt{In,Out}FFlag` instances using marshalling to `BoolFOption` and removes marshalling capabilities from `Opt{In,Out}FFlag` entirely. This simplifies the decisions developers have to make when creating new boolean options: * For simple cc1 flag pairs, use `Bool{,F,G}Option`. * For cc1 flag pairs that require complex marshalling logic, use `Opt{In,Out}FFlag` and implement marshalling manually. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D97370 --- clang/lib/Frontend/CompilerInvocation.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 92fb8ce..b640981 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1383,9 +1383,6 @@ void CompilerInvocation::GenerateCodeGenArgs( GenerateArg(Args, OPT_ftime_report, SA); } - if (Opts.FunctionSections) - GenerateArg(Args, OPT_ffunction_sections, SA); - if (Opts.PrepareForLTO && !Opts.PrepareForThinLTO) GenerateArg(Args, OPT_flto, SA); @@ -1676,9 +1673,6 @@ bool CompilerInvocation::ParseCodeGenArgsImpl(CodeGenOptions &Opts, } } - // Basic Block Sections implies Function Sections. - Opts.FunctionSections = Args.hasArg(OPT_ffunction_sections); - Opts.PrepareForLTO = Args.hasArg(OPT_flto, OPT_flto_EQ); Opts.PrepareForThinLTO = false; if (Arg *A = Args.getLastArg(OPT_flto_EQ)) { -- cgit v1.1