[Driver] Update BoolOption to handle Visibility. NFC
This updates the BoolOption family of option definitions to do the right thing with llvm::opt::Visibility. The only meaningful visibility at this point is llvm::opt::DefaultVis - in the interest of clarity we add an alias for this called "ClangOption" and update PosFlag, NegFlag, and BothFlags definitions to specify that. The updates to option definitions were done with the following three sed scripts (one to update Pos/NegFlag, one for BothFlags, and one that just cleans up whitespace a little): sed -E 's/((Pos|Neg)Flag<[A-Za-z]*, \[[^]]*\])(, "|>|,$)/\1, [ClangOption]\3/g' sed -E 's/(BothFlags<\[[^]]*\])(, ")/\1, [ClangOption], "/' sed -E 's/( *)((Pos|Neg)Flag<.*), ((Pos|Neg)Flag)/\1\2,\n\1\4/' These are idempotent and should be runnable on downstream versions of Options.td if needed to update any additional flags that are present. Differential Revision: https://reviews.llvm.org/D157150
Loading
Please sign in to comment