Page MenuHomePhabricator

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

Authored by jansvoboda11 on Jan 22 2021, 4:27 AM.



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.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jan 22 2021, 4:27 AM
jansvoboda11 requested review of this revision.Jan 22 2021, 4:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 22 2021, 4:27 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Jan 22 2021, 7:39 AM