summaryrefslogtreecommitdiffstats
path: root/llvm/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
commiteb10d4cbcef76df03ececd98355d1f3220862018 (patch)
tree0eff80d303cf69530cbf7d213e42289c5cdebcac /llvm/lib/Analysis
parent8aed9820e2fbece6eaa8c9c860137828518da799 (diff)
downloadbcm5719-llvm-eb10d4cbcef76df03ececd98355d1f3220862018.tar.gz
bcm5719-llvm-eb10d4cbcef76df03ececd98355d1f3220862018.zip
Handle a mismatch between # function args and call site args
llvm-svn: 4696
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DataStructure/TopDownClosure.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
index 5c15b50f13a..aa9a6a94c6c 100644
--- a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud