summaryrefslogtreecommitdiffstats
path: root/mlir/docs/Tutorials/Toy/Ch-4.md
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/docs/Tutorials/Toy/Ch-4.md')
-rw-r--r--mlir/docs/Tutorials/Toy/Ch-4.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/docs/Tutorials/Toy/Ch-4.md b/mlir/docs/Tutorials/Toy/Ch-4.md
index 2df009ddc2d..d449fe5c712 100644
--- a/mlir/docs/Tutorials/Toy/Ch-4.md
+++ b/mlir/docs/Tutorials/Toy/Ch-4.md
@@ -82,7 +82,7 @@ struct ToyInlinerInterface : public DialectInlinerInterface {
// Replace the values directly with the return operands.
assert(returnOp.getNumOperands() == valuesToRepl.size());
for (const auto &it : llvm::enumerate(returnOp.getOperands()))
- valuesToRepl[it.index()]->replaceAllUsesWith(it.value());
+ valuesToRepl[it.index()].replaceAllUsesWith(it.value());
}
};
```
@@ -310,7 +310,7 @@ inferred as the shape of the inputs.
```c++
/// Infer the output shape of the MulOp, this is required by the shape inference
/// interface.
-void MulOp::inferShapes() { getResult()->setType(getOperand(0)->getType()); }
+void MulOp::inferShapes() { getResult().setType(getOperand(0).getType()); }
```
At this point, each of the necessary Toy operations provide a mechanism by which
OpenPOWER on IntegriCloud