What to pass for the vmap argument of CloneFunction in llvm?

邮差的信 提交于 2020-01-03 18:53:29

问题


I am trying to clone the exact copy of another function. I have not been able to find any examples of CloneFunction usage on the internets.


回答1:


It turns at the you can just create a ValueToValueMapTy variable and pass it without initialization.




回答2:


The following code segment is enough for cloning the function called Func

ValueToValueMapTy VMap; auto *Clone = CloneFunction(Func, VMap);

rahib bob



来源:https://stackoverflow.com/questions/13104085/what-to-pass-for-the-vmap-argument-of-clonefunction-in-llvm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!