mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Remove spurious caller pointer in DSCallSite.
Also add functions to access pointer argument nodes cleanly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4235 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -91,14 +91,14 @@ void Steens::ResolveFunctionCall(Function *F,
|
||||
RetVal.mergeWith(Call.getReturnValueNode());
|
||||
|
||||
// Loop over all pointer arguments, resolving them to their provided pointers
|
||||
unsigned ArgIdx = 2; // Skip retval and function to call...
|
||||
unsigned PtrArgIdx = 0;
|
||||
for (Function::aiterator AI = F->abegin(), AE = F->aend(); AI != AE; ++AI) {
|
||||
std::map<Value*, DSNodeHandle>::iterator I = ValMap.find(AI);
|
||||
if (I != ValMap.end()) // If its a pointer argument...
|
||||
I->second.addEdgeTo(Call[ArgIdx++]);
|
||||
I->second.addEdgeTo(Call.getPtrArgNode(PtrArgIdx++));
|
||||
}
|
||||
|
||||
assert(ArgIdx == Call.size() && "Argument resolution mismatch!");
|
||||
assert(PtrArgIdx == Call.getNumPtrArgs() && "Argument resolution mismatch!");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user