问题
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