[LLVMdev] module functions

Zahra Marj zahrafatehimarj at gmail.com
Sun Feb 15 22:28:50 PST 2015


​

On Fri, Feb 13, 2015 at 8:54 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> > To solve, I store function basic blocks before remove it. and after
> function
> > insertion, I want to insert them to function. But when I want to add them
> > with insertInto() method, this error appears:
> > no member named 'insertInto' in 'llvm::BasicBlock'.
> > I'm confused. I sure this method exists in BasicBlock class.
>
> It seems to have been added after 3.5 branched, are you looking at
> documentation for trunk but compiling against an older LLVM?
>
​You are correct.​

>
> You might have slightly better luck with
> "Module->getFunctionList().push_back(OldFunc)" though. I wouldn't
> swear to it working, but if it did you wouldn't need to mess around
> with saving and restoring the basic blocks.
>
​Thanks very much. Your answer was very helpful for me.​

>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150216/c654bf6e/attachment.html>


More information about the llvm-dev mailing list