[PATCH] D142933: Add -print-multi-selection-flags argument
Michael Platings via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 2 03:23:38 PST 2023
michaelplatings added a comment.
In D142933#4099043 <https://reviews.llvm.org/D142933#4099043>, @Joe wrote:
> I did briefly try to pass a ToolChain to Gnu.cpp functions, but it became intrusive and had to add it in 5+ places, so unless I'm missing a trick to get the ToolChain from the Driver, my vote would go to the former.
The Driver class does in fact have a private getToolChain method. So two new possibilities:
1. Make getToolChain public.
2. Make getMultiSelectionFlags a method of Driver.
> I dropped the `march=` and used the same format as target-features, so it was simply `+m` or `+a`. I think this is intuitive enough without the `march=`
Thanks for explaining. I found that when I was writing a regex to match flags it was helpful to have a part of the string I could be sure would be there to avoid matching the wrong type of flag, and `march=` helped with that. I also worry that names from different types of flags could clash without some kind of namespacing.
> the form `x=y` is already broken when you add the flags from the flag list.
Can you give an example of what you mean by that? Sounds like something that might need fixing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142933/new/
https://reviews.llvm.org/D142933
More information about the cfe-commits
mailing list