<div dir="ltr"><font color="#000000">Hello Everyone,<br></font><div><br></div><div><font color="#000000">I am writing an llvm pass which clones a function. </font></div><div><font color="#000000">For example, foo is cloned to my_foo.</font></div><div><font color="#000000">It has all the instructions which are in foo and it works fine till the function is not called using a function pointer. I have used CloneFunction defined in <span style="font-variant-ligatures:no-common-ligatures;font-family:Monaco">Utils/CloneFunction.cpp. I am wondering how I can </span></font><span style="color:rgb(0,0,0);font-family:Monaco;font-variant-ligatures:no-common-ligatures">handle </span><font color="#000000"><span style="font-family:Monaco;font-variant-ligatures:no-common-ligatures">the case </span>when function<span style="font-family:Monaco;font-variant-ligatures:no-common-ligatures"> is called </span>using a function<span style="font-family:Monaco;font-variant-ligatures:no-common-ligatures"> pointer. Any insights or leads on how this can be achieved in llvm?</span></font></div><div><span style="font-variant-ligatures:no-common-ligatures;font-family:Monaco"><font color="#000000"><br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures;font-family:Monaco"><font color="#000000">Regards,</font></span></div><div><span style="font-variant-ligatures:no-common-ligatures;font-family:Monaco"><font color="#000000" style="">Sangeeta</font></span></div>
</div>