<div dir="ltr"><span><div>Hi Xiaochu,</div><div><br></div><div>There is one more step. You need to call initializeYourPassNamePass function in opt.cpp.</div><div><br></div><div>Volkan</div></span><br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 26, 2015 at 3:12 PM Xiaochu Liu via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear there,<br>
<br>
What I was trying to do is to create my own library in lib/Transform<br>
folder and compile it into an LLVM library. And use opt to invoke that<br>
the pass in my library by:<br>
opt -mypass <*.bc><br>
I copied the CMakeList and LLVMBuild from lib/Transform/ObjCARC.<br>
I managed to add my pass in LinkAllPasses.h and InitializePasses.h and<br>
compiled successfully.<br>
However, opt does not recognize my pass (-help does not list it at all).<br>
<br>
Can anyone point me a possible way to add a built-in pass for opt?<br>
<br>
Thanks,<br>
Xiaochu<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>