X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FDataStructure%2FTopDownClosure.cpp;h=def549226f2377ab118c7dbec355c91fa3962d4c;hb=72d29a4b0018e6f50b73c6f0f2e9a0d4d6741180;hp=de6233d4c8e01b1cfb8b733bef37b53d5346e7a2;hpb=2cec1d386720f84a9bf034c27a17cff35ebb3e63;p=oota-llvm.git diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp index de6233d4c8e..def549226f2 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?");