[LLVMdev] Getting started with LLVM Passes

Sean Peisert peisert at gmail.com
Fri Jul 8 16:44:04 PDT 2005


I am attempting to get started with LLVM passes by running the Hello
pass.  On my FreeBSD 5.x box, I've written and compiled (with
llvm-gcc) a Hello program, and also compiled the Hello pass in the
lib/Transforms/Hello directory.

I know that this results in a number of files, as follows:
> ls -l LLVM/llvm/lib/Transforms/Hello/Debug/
total 128
-rw-r--r--  1 sean  staff   11004 Jul  8 16:25 Hello.d
-rw-r--r--  1 sean  staff     358 Jul  8 16:25 Hello.lo
-rw-r--r--  1 sean  staff  115984 Jul  8 16:25 Hello.o

However, running the opt command results in the following error:

> opt -load LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo < hello.bc > /dev/null 
Error opening 'LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo': Can't
open :LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo: Cannot open
"LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo.so"
  -load request ignored.

Is there some sort of debugging output that can show why opt is
actualy having trouble opening the Hello.lo file?  I did try to run
with the -debug flag, but that also resulted in an error complaining
about a missing .so file, which is true, but perhaps also correct??

> opt -debug -load LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo < hello.bc > /dev/null
Error opening 'LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo': Can't
open :LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo: Cannot open
"LLVM/llvm/lib/Transforms/Hello/Debug/Hello.lo.so"
  -load request ignored.

Thanks,
Sean




More information about the llvm-dev mailing list