[clang] [compiler-rt] [llvm] Migrate llvm-profdata to Opt flag parsing (PR #177868)
David Zbarsky via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 6 07:57:11 PST 2026
dzbarsky wrote:
> I left some more comments, but in general this change is far bigger than it needs to be because it's trying to match the behavior of `cl::opt` one-to-one which was never our goal. I'd recommend looking at some of the previous conversions, the description of those changes has more details:
>
> * https://reviews.llvm.org/D105532
>
> * https://reviews.llvm.org/D105598
>
> * https://reviews.llvm.org/D105605
>
> * https://reviews.llvm.org/D105330
>
> * https://reviews.llvm.org/D104889
@petrhosek Thanks for sharing those, I've taken a stab at reworking this PR to align with the semantic flag changes made in the other ones, such as dropping the single-dash long flags for consistency, removing `=` flags, simplifying bool flag handling, etc. This required a lot of changes to tests but it's a fairly mechanical update and aligns better with other tools, so maybe worth it? Not sure.
Mind taking another look at the llvm-profdata main and let me know if you see additional opportunities to use OptTable better? Would love to get this merged!
https://github.com/llvm/llvm-project/pull/177868
More information about the cfe-commits
mailing list