[LLVMdev] Problems on getting the OPT resultant bitcode

Zhoujinguo zhoujinguo1988 at yahoo.cn
Fri Apr 6 23:34:36 PDT 2012


Hi,
I want to write a piece of code to instrument c++ programs. I have finished writing the pass, but I do not know how to get the resultant bitcode
I ran OPT with the following arguments:
opt -basiccg -basicaa -load /home/andy/llvm-3.0.src/Release/lib/InstTest.so -InstTest </home/andy/llvm-3.0.src/workspace/threadTest/Debug/threadTest.bc> -o=</home/andy/output/out.bc> /dev/null
where </home/andy/llvm-3.0.src/workspace/threadTest/Debug/threadTest.bc> is the input file, and </home/andy/output/out.bc> is the expected output file. InstTest is my pass.
However, opt treat </home/andy/output/out.bc> as the input file, and I cannot find any output any where. Also, if I donot use the "-o" argument, the input is </home/andy/llvm-3.0.src/workspace/threadTest/Debug/threadTest.bc> as expected but still I cannot find the output (the resultant bitcode).
What should I do?
I am expecting for your reply. Thank you very much.
Best Regards,Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120407/728cdc3a/attachment.html>


More information about the llvm-dev mailing list