<div dir="ltr">Sir, <div>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 <span style="font-family:arial,sans-serif;font-size:13px">clang -emit-llvm -c hello.cpp -o <a href="http://hello.bc.So">hello.bc.So</a> please if you can help me.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 6, 2014 at 3:48 PM, Dan Liew <span dir="ltr"><<a href="mailto:dan@su-root.co.uk" target="_blank">dan@su-root.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 5 June 2014 10:12, Prashanth Sharma <<a href="mailto:cs13m1017@iith.ac.in">cs13m1017@iith.ac.in</a>> wrote:<br>
> sir,<br>
</div><div class="">> I am able to generate .bc file for other normal code but my problem how to<br>
> run the pass source code. If I write some pass then how should I run that<br>
> pass?<br>
<br>
</div>The answer is right there is the documentation<br>
<br>
```<br>
$ opt -load ../../../Debug+Asserts/lib/Hello.so -hello < hello.bc > /dev/null<br>
```<br>
<br>
the ``-load`` flag loads your pass (which you built earlier) as a<br>
plugin. Once loaded the ``-hello`` command line option becomes<br>
available which will tell the opt tool to run that pass.<br>
<br>
Also in future I would advise you to **not** send images of your<br>
errors to the mailing list. It's a waste of space and you can easily<br>
send the error messages to a file (e.g. ``clang -emit-llvm hello.cpp<br>
2> errors.log`` ) and attach it instead which is much smaller and<br>
easier to parse.<br>
<br>
Thanks,<br>
Dan.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="arial,helvetica,sans-serif">Thanks <br></font></div><font face="arial,helvetica,sans-serif">Prashant Sharma<br></font></div>
</div>