<div dir="rtl"><div dir="ltr">include/llvm/Transforms/Utils/Cloning.h</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-05-31 8:11 GMT+03:00 Alexander Poddey <span dir="ltr"><<a href="mailto:alexander.poddey@gmx.net" target="_blank">alexander.poddey@gmx.net</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I need to get a copy of a function which should be 'selfcontained'<br>
(independent from the original function). Just like in C making a copy of a<br>
functions source code, changing the name.<br>
<br>
I tried to copy the basic blocks and their instructions (clone) to a new<br>
function, but the module check gives 'referring to an argument in another<br>
function'.<br>
This seems obvious, because the clone on instruction level can not know that<br>
the instruction later should belong to another function.<br>
<br>
I could not find some sort of copy method on function level...<br>
<br>
Alex<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>