[LLVMdev] Not able to run pass

Prashanth Sharma cs13m1017 at iith.ac.in
Sat Jun 7 11:13:07 PDT 2014


Sir,
your answer put me in starting situation.As I told I am not able to
generate .bc file of hello.cpp(the pass file) as it is giving errors when I
use clang -emit-llvm -c hello.cpp -o hello.bc.So please if you can help me.



Thanks


On Fri, Jun 6, 2014 at 3:48 PM, Dan Liew <dan at su-root.co.uk> wrote:

> 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.
>



-- 
Thanks
Prashant Sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140607/1f4c724f/attachment.html>


More information about the llvm-dev mailing list