[LLVMdev] writing a pass
Nicholas Rizzolo
rizzolo at cs.uiuc.edu
Wed Jul 9 10:48:02 PDT 2003
Hi,
I'm having a problem with opt. According to the "Writing an LLVM Pass"
tutorial, all I have to do to get the Hello pass to work is:
cd ${LLVM_HOME}/llvm/lib/Transforms/Hello
gmake
cd $MYTEST
opt -load ${OBJ_ROOT}/lib/Release/libhello.so -hello < something.bc > /dev/null
First (just as a friendly reminder), someone may want to go back and
double check a bunch of the command lines given in these tutorials. It
looks like the opt tool, for instance, doesn't take its input from STDIN.
Also, I don't have a Debug subdirectory like the tutorial said I would - I
have Release instead.
That aside, although opt doesn't report any errors when loading
libhello.so, it also doesn't let me do anything with it:
Unknown command line argument '-hello'. Try: opt --help'
I tried loading the library and specifying '-help' and the '-hello'
transformation was not listed. Any idea what I'm doing wrong?
Thanks,
- Nick
More information about the llvm-dev
mailing list