[LLVMdev] Change the return type of a function

Frits van Bommel fvbommel at gmail.com
Sun May 8 04:18:23 PDT 2011


On Sun, May 8, 2011 at 12:36 PM, Gokul Ramaswamy
<ramaswamy at cse.iitb.ac.in> wrote:
> Thanks John for the reply. Ya, I took a similar approach. I cloned the
> entire
> function using CloneFunctionInto() in Cloning.h.
>
> Now, I am facing a new Problem. I am not able to understand the concept of
> ValueToValueMap. I am trying to figure it out by testing it. But I am
> getting
> errors like "Referring to an argument in another function!". I am not able
> to get
> good examples nor good documentation on ValueToValueMap. Can you point
> me in the right direction ?

You need to add some 'old first argument ==> new first argument', 'old
second argument ==> new second argument' (and so on) mappings to it.



More information about the llvm-dev mailing list