[LLVMdev] Not able to run pass

Dan Liew dan at su-root.co.uk
Fri Jun 6 03:18:57 PDT 2014


On 5 June 2014 10:12, Prashanth Sharma <cs13m1017 at iith.ac.in> wrote:
> sir,
> I am able to generate .bc file for other normal code but my problem how to
> run the pass source code. If I write some pass then how should I run that
> pass?

The answer is right there is the documentation

```
$ opt -load ../../../Debug+Asserts/lib/Hello.so -hello < hello.bc > /dev/null
```

the ``-load`` flag loads your pass (which you built earlier) as a
plugin. Once loaded the ``-hello`` command line option becomes
available which will tell the opt tool to run that pass.

Also in future I would advise you to **not** send images of your
errors to the mailing list. It's a waste of space and you can easily
send the error messages to a file (e.g. ``clang -emit-llvm hello.cpp
2> errors.log`` ) and attach it instead which is much smaller and
easier to parse.

Thanks,
Dan.



More information about the llvm-dev mailing list