Hi, I used the following code to define an option passed by user in a user-defined pass:
static cl::opt<bool> InstrumentdFile("InstrumentdFile",
cl::desc("Is an instrumented file?"),
cl::init(false), cl::Hidden);
Then I compiled the pass into a lib, I use the command to execute the pass
opt -load-pass-plugin=**.so -passes="**" -InstrumentdFile=1 ...
But I got the following error:
opt: Unknown command line argument '-InstrumentdFile=1'. Try: 'opt --help'
opt: Did you mean '--instrorderfile'?
My opt version is 14.0.6
If I delete the -InstrumentdFile=1
, the pass executes successfully. How Can I fix this?