Add Block::successors.

This commit is contained in:
Dejan Mircevski
2016-01-17 23:27:45 -05:00
parent 60a7f3f7ae
commit 5fe789b4af
2 changed files with 5 additions and 4 deletions

View File

@@ -857,7 +857,7 @@ void Builder::leaveFunction()
if (! block->isTerminated()) {
// Whether we're in an unreachable (non-entry) block.
bool unreachable = function.getEntryBlock() != block && block->getNumPredecessors() == 0;
bool unreachable = function.getEntryBlock() != block && block->getPredecessors().empty();
if (unreachable) {
// Given that this block is at the end of a function, it must be right after an