aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-11 21:36:05 +0000
committerChris Lattner <sabre@nondot.org>2002-11-11 21:36:05 +0000
commit0ecc42619f36195ab2a904622821833cdf323e8f (patch)
tree881419614e7a40cfe590187d9fd2b75957c182ba /lib/Analysis
parente425844d8c238d570bcab7f808f1ce9714c37be0 (diff)
downloadexternal_llvm-0ecc42619f36195ab2a904622821833cdf323e8f.zip
external_llvm-0ecc42619f36195ab2a904622821833cdf323e8f.tar.gz
external_llvm-0ecc42619f36195ab2a904622821833cdf323e8f.tar.bz2
Handle a mismatch between # function args and call site args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/TopDownClosure.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp
index 5c15b50..aa9a6a9 100644
--- a/lib/Analysis/DataStructure/TopDownClosure.cpp
+++ b/lib/Analysis/DataStructure/TopDownClosure.cpp
@@ -160,7 +160,8 @@ void TDDataStructures::calculateGraph(Function &F) {
// Resolve all of the arguments...
Function::aiterator AI = Callee->abegin();
- for (unsigned i = 0, e = NewCS.getNumPtrArgs(); i != e; ++i, ++AI) {
+ for (unsigned i = 0, e = NewCS.getNumPtrArgs();
+ i != e && AI != Callee->aend(); ++i, ++AI) {
// Advance the argument iterator to the first pointer argument...
while (!DS::isPointerType(AI->getType())) {
++AI;