Skip to content

Commit b616399

Browse files
committed
[clang][cli] NFC: Simplify BoolOption API
The `Bool{,F,G}Option` TableGen classes were designed after `Opt{In,Out}FFlag`, which put marshalling info on only one of the boolean options. To encode which record is supposed to carry the marshalling info (and be visible on -cc1 command-line), we used the `ChangedBy` and `ResetBy` classes. However, we need to put marshalling info on both records anyways (see D93008 for details). This means we don't really need the distinction between `ChangedBy/ResetBy + BoolOption` and `FlagDef + BoolOptionBase` anymore. This patch reduces the number of ways one can encode the marshalling information for pairs of boolean flags. Regardless of whether the key path value defaults to a statically known boolean, or a result of an expression, one can always use the new `BoolOption` and `PosFlag<SetTrue>, NegFlag<SetFalse>` syntax. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D95340
1 parent 90ebc48 commit b616399

File tree

1 file changed

+349
-417
lines changed

1 file changed

+349
-417
lines changed

0 commit comments

Comments
 (0)