[llvm-dev] Add a pass to opt
Volkan Keles via llvm-dev
llvm-dev at lists.llvm.org
Mon Oct 26 15:54:02 PDT 2015
There is one more step. You need to call initializeYourPassNamePass
function in opt.cpp.
On Mon, Oct 26, 2015 at 3:12 PM Xiaochu Liu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Dear there,
> What I was trying to do is to create my own library in lib/Transform
> folder and compile it into an LLVM library. And use opt to invoke that
> the pass in my library by:
> opt -mypass <*.bc>
> I copied the CMakeList and LLVMBuild from lib/Transform/ObjCARC.
> I managed to add my pass in LinkAllPasses.h and InitializePasses.h and
> compiled successfully.
> However, opt does not recognize my pass (-help does not list it at all).
> Can anyone point me a possible way to add a built-in pass for opt?
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev