search for: getopcodevalu

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

Did you mean: getopcodevalue
2009 Jun 18
2
[LLVMdev] Referring to an argument in another function
...the arg from the free function and try to pass it to foo... if (isCallToFree(&I)) { Value* P; if (Function *F = I.getCalledFunction()) { Function::arg_iterator ait = F->arg_begin(); if (ait) { P = &(*ait); } createCallInst(mem_fcall, &I, 3, getOpcodeValue(I), getInstrIDValue(), P); } } createCallInst is my own wrapper. The error thrown during the pass is: "Referring to an argument in another function!" Any suggestions? Thanks, Scott
2009 Jun 18
0
[LLVMdev] Referring to an argument in another function
...lvm/Support/CallSite.h" // ... CallSite CS(&I); CallSite::arg_iterator ait = CS.arg_begin(), aend = CS.arg_end(); > if (ait) { You want if (ait != aend) { here. > P = &(*ait); > } > createCallInst(mem_fcall, &I, 3, getOpcodeValue(I), > getInstrIDValue(), P); > } > } > > createCallInst is my own wrapper. The error thrown during the pass is: > > "Referring to an argument in another function!" > > Any suggestions?