search for: clone_funct

Displaying 2 results from an estimated 2 matches for "clone_funct".

2016 Jul 14
2
clone function
...gn 4 store i32 %i, i32* %i.addr, align 4 ret void } to another function which should, after the CloneFunction, be like: define void @cloned_function(i32 %i, i8* %ptr) #0 { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 ret void } To do so, I first declared the clone_function with its arguments into the module then I should call CloneFunction like: Function *function = M.getFunction("function"); Function *cloned_function = M.getFunction("cloned_function"); cloned_function = CloneFunction( function, VM, false /* or true? didn't get...
2016 Jul 15
2
clone function
...; } > > to another function which should, after the CloneFunction, be like: > > define void @cloned_function(i32 %i, i8* %ptr) #0 { > entry: > %i.addr = alloca i32, align 4 > store i32 %i, i32* %i.addr, align 4 > ret void > } > > To do so, I first declared the clone_function with its arguments into the > module then I should call CloneFunction like: > > Function *function = M.getFunction("function"); > Function *cloned_function = M.getFunction("cloned_function”); > > > This last statement is dead code, you overwrite the cloned_fun...