[LLVMdev] cloning after adding external mapping

Weiss, Eran Eran.Weiss at emc.com
Sun Feb 24 07:38:26 PST 2013


Hi,

I'm not sure if this is a bug or a feature, but I noticed the following behavior:

I have a declaration of a function , with no body. I set it to use an external function pointer using addGlobalMapping. This works fine.
Later, I clone the function – and the cloned function doesn't have the global mapping.

I realize that the global mapping is a part of the execution engine, and not of the module or of the function. As such it is not cloned when the module or function do. However, this is not what I would expect by cloning – I would expect to get the same behavior from the clone.

Is there a reason not to clone the mapping as well? Or a way to set a function pointer that will be cloned?

Thanks,
Eran.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130224/98a9f699/attachment.html>


More information about the llvm-dev mailing list