[PATCH] D95221: [clang][cli] NFC: Move prefix to the front of BoolOption

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 22 04:27:31 PST 2021


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

The prefix used to be the last (optional) argument to BoolOption. This decision was made with the expectation that only few command line options would need to pass it explicitly instead of using Bool{F,G}Option. It turns out that a considerable number of options don't conform to Bool{F,G}Option and need to provide the prefix anyways. This sometimes requires to explicitly pass `BothFlags<[]>`.

This patch makes prefix the first parameter, so it now directly precedes the spelling base string. Now 8 options dropped `BothFlags<[]>` and only two options (`pthread` and `emit_llvm_uselists`) need to pass an empty prefix.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95221

Files:
  clang/include/clang/Driver/Options.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95221.318484.patch
Type: text/x-patch
Size: 25322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210122/d3e90c03/attachment-0001.bin>


More information about the cfe-commits mailing list