[LLVMdev] how to disable command line options in llvm libs
Jochen Wilhelmy
j.wilhelmy at arcor.de
Sat Oct 9 04:59:36 PDT 2010
Hi!
I'd like to use llvm::cl as it seems quite easy to use, but there
currently seems to be
a major drawback: if I do -help then all options from all llvm libs that
I have included
are shown, but I just have an input file and output file to specify. Is
it possible to
disable the existing options? For example by assigning each option a flag.
One flag could be for llvm options, another for hidden llvm options and one
for my application (if llvm uses 2 there are 30 left ;-). These flags
could replace the hidden and
"really hidden" states. Options would be hidden if their flag is not set
in an int passed to
cl::ParseCommandLineOptions (perhaps 2 sets of flags, one for -help and
one for -help-hidden).
Another possibility would be to specify the list of registered options
explicitly for
each of my options (default is the static one in CommandLine.cpp) and this
could be passed to cl::ParseCommandLineOptions.
-Jochen
More information about the llvm-dev
mailing list