diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-04 02:29:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-04 02:29:15 +0000 |
commit | cd691d2047f9f4daeb670a66f670c41e8bffc514 (patch) | |
tree | bb555959d57e528325038b7fb9bcabb31f5bf2df /llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp | |
parent | ee792946bb501ef704034ee537f176040a3674f6 (diff) | |
download | bcm5719-llvm-cd691d2047f9f4daeb670a66f670c41e8bffc514.tar.gz bcm5719-llvm-cd691d2047f9f4daeb670a66f670c41e8bffc514.zip |
Give a better error message in an unhandled case
llvm-svn: 4521
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp index a68e9547f1e..6b70490feb7 100644 --- a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -61,7 +61,14 @@ static void ResolveArguments(DSCallSite &Call, Function &F, 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)); |