diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2021-02-25 08:47:59 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2021-02-25 08:53:58 +0100 |
commit | d8a8e5d6240a1db809cd95106910358e69bbf299 (patch) | |
tree | bee663f4daf8bbab8bd796772a0b02bfe1ef553c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 88e45f00c156170ed562bbacad3b2a21633c0f7a (diff) | |
download | llvm-d8a8e5d6240a1db809cd95106910358e69bbf299.zip llvm-d8a8e5d6240a1db809cd95106910358e69bbf299.tar.gz llvm-d8a8e5d6240a1db809cd95106910358e69bbf299.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
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)) { |