search for: old_func

Displaying 1 result from an estimated 1 matches for "old_func".

Did you mean: cold_func
2016 Mar 23
0
Writing Module Pass to modify arguments of a function
...s, my goal is to change the number of arguments of a function found in the IR( the first function found). My approach is using a modulepass ,creating a function with exactly one argument then cloning the first found function using *CloneFunctionInto*; then i replace uses of the old function using *Old_func->replaceAllUsesWith(new_Func)*. I have the end code figured however, I'm stuck at the beginning of the loop : *"for (Module::iterator F = M.begin(), e = M.end(); F != e; ++F) {* * Function *Func=M.getAtIndex(F);"* Now the problem is there is no such function as getAtIndex, so h...