How to view possible command line options of LLVM pass loaded using opt tool?
I've registered the following options for my pass:
static cl::opt<int>
ObfProbRate("ipred-prob",
cl::desc("Probability [%] each basic blocks will be obfuscated"),
cl::value_desc("probability rate"), cl::init(defaultObfRate), cl::Optional);
static cl::opt<int>
ObfTimes("ipred-times", cl::desc("Times the to loop on a function"),
cl::value_desc("number of times"), cl::init(defaultObfTime), cl::Optional);
The pass itself runs just fine, and it accepts the command line options via opt
.
However, I'd like to see the available options. Therefore I issue the following command:
opt -load cmake-build-debug/ipred/libIPredOPass.so -ipredO -help
Now, instead of available options being displayed, it displays the usual opt -help
output.
How can I see the command line options specific to my ModulePass
pass?
I am running LLVM 3.9.1 on Ubuntu 16.04 LTS.
opt -help
output contain your options?