Verify that ReturnOp only appears within the region of a FuncOp.
authorRiver Riddle <riverriddle@google.com>
Tue, 16 Jul 2019 19:45:05 +0000 (12:45 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 16 Jul 2019 20:45:54 +0000 (13:45 -0700)
commita4cbe4ebe1a6735bda4630919900b8eeb03b7626
treec201008bc4a77f055a3e90fab36dfb74cf3182ea
parent0002e2964dd665f94a00f0df3b3fc94311f6bc43
Verify that ReturnOp only appears within the region of a FuncOp.

The invariants of ReturnOp are directly tied to FuncOp, making ReturnOp invalid in any other context.

PiperOrigin-RevId: 258421200
mlir/include/mlir/IR/OpDefinition.h
mlir/lib/StandardOps/Ops.cpp
mlir/test/IR/invalid-ops.mlir