Robert Zeh
2008-Mar-08 15:48 UTC
[LLVMdev] Changing the return type for a function after construction
Is there any way to change the return type of a function after constructing one? Thanks, Robert
Chris Lattner
2008-Mar-08 20:30 UTC
[LLVMdev] Changing the return type for a function after construction
On Mar 8, 2008, at 7:48 AM, Robert Zeh wrote:> Is there any way to change the return type of a function after > constructing one?Nope. Once created, you can't change the type of a Value. The best way to do this is to create a new function, splice the body of the old over (a constant time operation) and update the new one. Take a look at the dead argument elimination pass for some example code. -Chris
Maybe Matching Threads
- [LLVMdev] Setting how aggressive the inliner is in 2.1
- [LLVMdev] Opaque type usage to represent foreign types
- [LLVMdev] Setting how aggressive the inliner is in 2.1
- [LLVMdev] Instrumenting virtual function calls
- [LLVMdev] Cleanup of constant sequence type construction