NFC: Use Region::getBlocks to fix build failure with drop_begin.

PiperOrigin-RevId: 281656603
Change-Id: I1177159ce8c74b3b42b519f9d8e19a8275232ca5
This commit is contained in:
River Riddle 2019-11-20 19:20:04 -08:00 committed by TensorFlower Gardener
parent 8f14765913
commit 31dada40e8

View File

@ -300,7 +300,7 @@ static LogicalResult deleteDeadness(MutableArrayRef<Region> regions,
// Delete block arguments.
// The entry block has an unknown contract with their enclosing block, so
// skip it.
for (Block &block : llvm::drop_begin(region, 1)) {
for (Block &block : llvm::drop_begin(region.getBlocks(), 1)) {
// Iterate in reverse to avoid shifting later arguments when deleting
// earlier arguments.
for (unsigned i = 0, e = block.getNumArguments(); i < e; i++)