Fix problem breaking Fhourstones
authorChris Lattner <sabre@nondot.org>
Mon, 10 Feb 2003 18:16:19 +0000 (18:16 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Feb 2003 18:16:19 +0000 (18:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Steensgaard.cpp

index b17846e2ecad462070a3a509ff6c311cd7d3cba8..0458670e6fbb70856f04efbfd98e2d93b3cfd257 100644 (file)
@@ -92,7 +92,8 @@ void Steens::ResolveFunctionCall(Function *F, const DSCallSite &Call,
 
   // Loop over all pointer arguments, resolving them to their provided pointers
   unsigned PtrArgIdx = 0;
-  for (Function::aiterator AI = F->abegin(), AE = F->aend(); AI != AE; ++AI) {
+  for (Function::aiterator AI = F->abegin(), AE = F->aend();
+       AI != AE && PtrArgIdx < Call.getNumPtrArgs(); ++AI) {
     hash_map<Value*, DSNodeHandle>::iterator I = ValMap.find(AI);
     if (I != ValMap.end())    // If its a pointer argument...
       I->second.mergeWith(Call.getPtrArg(PtrArgIdx++));