Dynamically linking against libLLVM.so otherwise shows all cl::opts scattered around the code base.
Per-tool follow-up of https://reviews.llvm.org/D104363
Differential D105893
[llvm][tools] Hide unrelated llvm-bcanalyzer options tbaeder on Jul 13 2021, 7:53 AM. Authored by
Details Dynamically linking against libLLVM.so otherwise shows all cl::opts scattered around the code base. Per-tool follow-up of https://reviews.llvm.org/D104363
Diff Detail
Unit Tests Event TimelineComment Actions This patch needs test/tools/llvm-bcanalyzer/help.test. See @jhenderson's comment on the other thread: "It may also be a good idea to add testing similar to the llvm-strings test to show that only the expected options categories are present." Consider a NOT pattern (https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-not-directive) --implicit-check-not='{{[Oo]}}ptions:' to avoid undesired options categories> Comment Actions It doesn't seem very useful to me to add tests for the help output. Since all categories are listed in the HideUnrelatedOptions() call anyway, new categories are not just gonna show up without changing that call. And this one test doesn't cover new tools that are going to be added either. Added the suggested test case anyway, with some modifications to make it work. |
Use --implicit-check-not='{{[Oo]}}ptions:'