[PATCH] D97370: [clang][cli] Remove marshalling from Opt{In, Out}FFlag

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 24 02:30:12 PST 2021


jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, dexonsmith.
Herald added a subscriber: dang.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97370

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Frontend/CompilerInvocation.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97370.326028.patch
Type: text/x-patch
Size: 12842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210224/9cb26512/attachment-0001.bin>


More information about the cfe-commits mailing list