[MLIR] Flag no-terminator error on the last operation of non-empty blocks
authorRahul Joshi <jurahul@google.com>
Sat, 7 Nov 2020 00:24:35 +0000 (16:24 -0800)
committerRahul Joshi <jurahul@google.com>
Mon, 9 Nov 2020 17:42:11 +0000 (09:42 -0800)
commitc96168975b25e58d72f03de4929255a5b499df42
tree8fd10fd884d792f4425f6a25092276b9198ca476
parente625f9c5d1e2e69d18febae0e8d3f808df35c4c8
[MLIR] Flag no-terminator error on the last operation of non-empty blocks

- When a block is not empty and does not end with a terminator, flag the error on the
  last operation of the block instead of the start of the block.

Differential Revision: https://reviews.llvm.org/D90988
mlir/lib/IR/Verifier.cpp
mlir/test/IR/invalid.mlir