[LLVMdev] module functions

Tim Northover t.p.northover at gmail.com
Fri Feb 13 09:24:09 PST 2015


> 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 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.

Cheers.

Tim.



More information about the llvm-dev mailing list