[LLVMdev] changing function type

Chris Lattner sabre at nondot.org
Mon Oct 2 14:58:42 PDT 2006

On Mon, 2 Oct 2006, Ryan M. Lefever wrote:
> Is there any way to change the type of a function in LLVM without
> creating a copy of the function and replacing all references of the old
> function with the new function.


> For example, if I wanted to remove a
> parameter from the function, how could I accomplish that?

You'd have to do what you describe above.  Check out the 
IPO/DeadArgElim.cpp transformation, which does just this.



More information about the llvm-dev mailing list