From 0595edd80fd6eae751434790631e05112a0665d5 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Jul 2022 01:10:51 -0700 Subject: [PATCH] [mlir][toy] Replace Optional::getValue with value. NFC --- mlir/examples/toy/Ch2/mlir/MLIRGen.cpp | 2 +- mlir/examples/toy/Ch3/mlir/MLIRGen.cpp | 2 +- mlir/examples/toy/Ch4/mlir/MLIRGen.cpp | 2 +- mlir/examples/toy/Ch5/mlir/MLIRGen.cpp | 2 +- mlir/examples/toy/Ch6/mlir/MLIRGen.cpp | 2 +- mlir/examples/toy/Ch7/mlir/MLIRGen.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp index 27a2feb..d929da8 100644 --- a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp @@ -221,7 +221,7 @@ private: // 'return' takes an optional expression, handle that case here. mlir::Value expr = nullptr; if (ret.getExpr().hasValue()) { - if (!(expr = mlirGen(*ret.getExpr().getValue()))) + if (!(expr = mlirGen(*ret.getExpr().value()))) return mlir::failure(); } diff --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp index 27a2feb..d929da8 100644 --- a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp @@ -221,7 +221,7 @@ private: // 'return' takes an optional expression, handle that case here. mlir::Value expr = nullptr; if (ret.getExpr().hasValue()) { - if (!(expr = mlirGen(*ret.getExpr().getValue()))) + if (!(expr = mlirGen(*ret.getExpr().value()))) return mlir::failure(); } diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp index a68c72a..7bc9080 100644 --- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp @@ -225,7 +225,7 @@ private: // 'return' takes an optional expression, handle that case here. mlir::Value expr = nullptr; if (ret.getExpr().hasValue()) { - if (!(expr = mlirGen(*ret.getExpr().getValue()))) + if (!(expr = mlirGen(*ret.getExpr().value()))) return mlir::failure(); } diff --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp index a68c72a..7bc9080 100644 --- a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp @@ -225,7 +225,7 @@ private: // 'return' takes an optional expression, handle that case here. mlir::Value expr = nullptr; if (ret.getExpr().hasValue()) { - if (!(expr = mlirGen(*ret.getExpr().getValue()))) + if (!(expr = mlirGen(*ret.getExpr().value()))) return mlir::failure(); } diff --git a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp index a68c72a..7bc9080 100644 --- a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp @@ -225,7 +225,7 @@ private: // 'return' takes an optional expression, handle that case here. mlir::Value expr = nullptr; if (ret.getExpr().hasValue()) { - if (!(expr = mlirGen(*ret.getExpr().getValue()))) + if (!(expr = mlirGen(*ret.getExpr().value()))) return mlir::failure(); } diff --git a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp index 478f0de..2fcf8cc 100644 --- a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp @@ -358,7 +358,7 @@ private: // 'return' takes an optional expression, handle that case here. mlir::Value expr = nullptr; if (ret.getExpr().hasValue()) { - if (!(expr = mlirGen(*ret.getExpr().getValue()))) + if (!(expr = mlirGen(*ret.getExpr().value()))) return mlir::failure(); } -- 2.7.4