NFC: Use Region::getBlocks to fix build failure with drop_begin.
authorRiver Riddle <riverriddle@google.com>
Thu, 21 Nov 2019 03:20:04 +0000 (19:20 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 21 Nov 2019 03:30:46 +0000 (19:30 -0800)
PiperOrigin-RevId: 281656603

mlir/lib/Transforms/Utils/RegionUtils.cpp

index c6bf1df..ba77cea 100644 (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++)