aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/TopDownClosure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/TopDownClosure.cpp')
-rw-r--r--lib/Analysis/DataStructure/TopDownClosure.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp
index de6233d4c8..def549226f 100644
--- a/lib/Analysis/DataStructure/TopDownClosure.cpp
+++ b/lib/Analysis/DataStructure/TopDownClosure.cpp
@@ -183,16 +183,10 @@ void TDDataStructures::calculateGraph(Function &F) {
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())) {
+ while (AI != Callee->aend() && !DS::isPointerType(AI->getType()))
++AI;
-#ifndef NDEBUG
- if (AI == Callee->aend())
- std::cerr << "Bad call to Func: " << Callee->getName() << "\n";
-#endif
- assert(AI != Callee->aend() &&
- "# Args provided is not # Args required!");
- }
-
+ if (AI == Callee->aend()) break;
+
// Add the link from the argument scalar to the provided value
DSNodeHandle &NH = CG.getNodeForValue(AI);
assert(NH.getNode() && "Pointer argument without scalarmap entry?");