Thanks Ted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93413
91177308-0d34-0410-b5e6-
96231b3b80d8
// Mark all live things first.
MarkLive(&cfg->getEntry(), live);
- for (unsigned i = 0; i < cfg->getNumBlockIDs(); ++i) {
- if (!live[i]) {
- CFGBlock &b = *(cfg->begin()[i]);
+ for (CFG::iterator I = cfg->begin(), E = cfg->end(); I != E; ++I) {
+ CFGBlock &b = **I;
+ if (!live[b.getBlockID()]) {
if (!b.empty())
Diag(b[0].getStmt()->getLocStart(), diag::warn_unreachable);
// Avoid excessive errors by marking everything reachable from here