[llvm-commits] [poolalloc] r108269 - /poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
Will Dietz
wdietz2 at illinois.edu
Tue Jul 13 13:20:17 PDT 2010
Author: wdietz2
Date: Tue Jul 13 15:20:16 2010
New Revision: 108269
URL: http://llvm.org/viewvc/llvm-project?rev=108269&view=rev
Log:
Make CBU fail gracefully (assert) if there is no entry for a given function.
Modified:
poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
Modified: poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp?rev=108269&r1=108268&r2=108269&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp (original)
+++ poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp Tue Jul 13 15:20:16 2010
@@ -54,10 +54,13 @@
DSCallGraph::callee_iterator csi = callgraph.callee_begin(*ii),
cse = callgraph.callee_end(*ii);
if (csi != cse && SM.find(*csi) != SM.end()) {
+ assert((SM.find(*csi) != SM.end()) && "Function not in Global graph?");
DSNodeHandle& SrcNH = SM.find(*csi)->second;
++csi;
- for (; csi != cse; ++csi)
+ for (; csi != cse; ++csi) {
+ assert((SM.find(*csi) != SM.end()) && "Function not in Global graph?");
SrcNH.mergeWith(SM.find(*csi)->second);
+ }
}
}
}
More information about the llvm-commits
mailing list