[LLVMdev] Problems creating a pass

Juan Carlos Martinez Santos juanc.martinez.santos at gmail.com
Fri Jun 19 11:59:09 PDT 2009


Yes, I changed the names, tried another folder, change all the files
(file.cpp, Makefile, and CMakeList.txt) but still I get the same message.

Somebody has a clue?

Thanks,

Juan Carlos

On Fri, Jun 19, 2009 at 2:31 PM, Scott Ricketts <sricketts at maxentric.com>wrote:

> Did you try changing the name from Hello to MyHello or something like
> that? I seem to remember having a similar problem. My tutorial code
> names the struct MyHello and then registers it as follows:
>
> RegisterPass<MyHello> X("myhello", "My Hello World Pass");
>
> You will likely need to change the Makefile as well.
>
> Scott
>
> On Fri, Jun 19, 2009 at 11:15 AM, Juan Carlos Martinez
> Santos<juanc.martinez.santos at gmail.com> wrote:
> > Hello,
> >
> > Following the tutorial for writing a pass, I found the next problem.
> >
> > *****************************
> > :~/llvm/test$ opt -load ../llvm/Debug/lib/mypass.so -mypass < hello.bc >
> > /dev/null
> > opt: Pass.cpp:151: void<unnamed>::PassRegistrar::RegisterPass(const
> > llvm::PassInfo&): Assertion `Inserted && "Pass registered multiple
> times!"'
> > failed.
> > Aborted
> > *****************************
> >
> > I just <copy> and then <paste> the code that appears in the web page, and
> > follow the instructions to run the pass. There is something missed,
> > something that is not in the web page
> > [http://llvm.org/docs/WritingAnLLVMPass.html#quickstart].
> >
> > Thanks in advance.
> > --
> > Juan Carlos
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
> >
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Juan Carlos Martínez Santos
242 Foster Drive Apt H
Colonial Townhouse Apartments
Willimantic, CT 06226-1538
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090619/2df4130f/attachment.html>


More information about the llvm-dev mailing list