diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h --- a/mlir/include/mlir/IR/Builders.h +++ b/mlir/include/mlir/IR/Builders.h @@ -188,7 +188,8 @@ setInsertionPoint(op); } - explicit OpBuilder(Block *block) : OpBuilder(block, block->end()) {} + /// Create a builder and set the insertion point to the start of the Block. + explicit OpBuilder(Block *block) : OpBuilder(block, block->begin()) {} OpBuilder(Block *block, Block::iterator insertPoint) : OpBuilder(block->getParent()) {