[LLVMdev] Problems with Passing agrument to a Pass
snavabpo at uwaterloo.ca
Wed Sep 1 19:02:59 CDT 2010
Ok, me again,
just found out the problem, I got to explicitly specify -line-number 18 to
make it work :wistle:.
> I have a very naive question. I've written a pass that gets an argument
> from the command line with the following code:
> static cl::opt<int> LineNum("line-number", cl::Hidden,
> cl::Required,cl::desc("line of variable being observed"));
> Now when I run it, it seems like it cant see that I've put in an argument
> on the command line:
> opt -load /Users/sam/llvm/llvm-2.6/Release/lib/LLVMHello.dylib -hello2
> goo3.bc 18
> which "18" is the argument. Stupidly enough I've put this argument any
> where in the command line and it wont work it keeps telling me:
> opt: Too many positional arguments specified!
> Can specify at most 1 positional arguments: See: opt --help
> opt: for the -line-number option: must be specified at least once!
> Can someone please help me out. Thank you :)
View this message in context: http://old.nabble.com/Problems-with-Passing-agrument-to-a-Pass-tp29599541p29599559.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the LLVMdev