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:
Vikram S. Adve
2002-10-20 21:41:02 +00:00
parent e80fe61a72
commit 26b98265b7
7 changed files with 52 additions and 41 deletions

View File

@ -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!");
}