diff options
| author | Chris Lattner <clattner@google.com> | 2018-12-26 11:21:53 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 14:36:35 -0700 |
| commit | d613f5ab65bbb80c3f5a0a38fef22cb4878c4358 (patch) | |
| tree | dfa4207dd899f87741ad784fe8fc343afba6885d /mlir/lib/IR/BuiltinOps.cpp | |
| parent | 9a4060d3f50f046973d4e0b61f324bbc6ebbbdb9 (diff) | |
| download | bcm5719-llvm-d613f5ab65bbb80c3f5a0a38fef22cb4878c4358.tar.gz bcm5719-llvm-d613f5ab65bbb80c3f5a0a38fef22cb4878c4358.zip | |
Refactor MLFunction to contain a StmtBlock for its body instead of inheriting
from it. This is necessary progress to squaring away the parent relationship
that a StmtBlock has with its enclosing if/for/fn, and makes room for functions
to have more than one block in the future. This also removes IfClause and ForStmtBody.
This is step 5/n towards merging instructions and statements, NFC.
PiperOrigin-RevId: 226936541
Diffstat (limited to 'mlir/lib/IR/BuiltinOps.cpp')
| -rw-r--r-- | mlir/lib/IR/BuiltinOps.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/IR/BuiltinOps.cpp b/mlir/lib/IR/BuiltinOps.cpp index 5d7ba237b44..dfd59c4d380 100644 --- a/mlir/lib/IR/BuiltinOps.cpp +++ b/mlir/lib/IR/BuiltinOps.cpp @@ -474,7 +474,7 @@ void ReturnOp::print(OpAsmPrinter *p) const { bool ReturnOp::verify() const { const Function *function; if (auto *stmt = dyn_cast<OperationStmt>(getOperation())) - function = cast<MLFunction>(stmt->getBlock()); + function = stmt->getBlock()->findFunction(); else function = cast<Instruction>(getOperation())->getFunction(); |

