[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 3 20:30:01 PST 2002
Changes in directory llvm/lib/Analysis/DataStructure:
BottomUpClosure.cpp updated: 1.29 -> 1.30
---
Log message:
Give a better error message in an unhandled case
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.29 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.30
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.29 Sun Nov 3 15:27:48 2002
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sun Nov 3 20:29:15 2002
@@ -61,7 +61,14 @@
Function::aiterator AI = F.abegin();
for (unsigned i = 0, e = Call.getNumPtrArgs(); i != e; ++i, ++AI) {
// Advance the argument iterator to the first pointer argument...
- while (!isPointerType(AI->getType())) ++AI;
+ while (!isPointerType(AI->getType())) {
+ ++AI;
+#ifndef NDEBUG
+ if (AI == F.aend())
+ std::cerr << "Bad call to Function: " << F.getName() << "\n";
+#endif
+ assert(AI != F.aend() && "# Args provided is not # Args required!");
+ }
// Add the link from the argument scalar to the provided value
ScalarMap[AI].mergeWith(Call.getPtrArg(i));
More information about the llvm-commits
mailing list