summaryrefslogtreecommitdiff
path: root/mlir/examples
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-17 19:23:50 +0000
committerFangrui Song <i@maskray.me>2022-12-17 19:23:50 +0000
commit76b11003728dc1e37a28d69db81fb7952c7486e9 (patch)
tree6aad113f8fa1170ca42bed63a8719cea2bd0e4d0 /mlir/examples
parentcbb0981388b6b2c4ccc574a674841ecd517115e5 (diff)
downloadllvm-76b11003728dc1e37a28d69db81fb7952c7486e9.tar.gz
[mlir] llvm::Optional::value() && => operator*/operator->
std::optional::value() has undesired exception checking semantics and is unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The call sites block std::optional migration.
Diffstat (limited to 'mlir/examples')
-rw-r--r--mlir/examples/toy/Ch2/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch3/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch4/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch5/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch6/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch7/mlir/MLIRGen.cpp2
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 1790f4b550a6..0c582ed4f100 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().has_value()) {
- if (!(expr = mlirGen(*ret.getExpr().value())))
+ if (!(expr = mlirGen(**ret.getExpr())))
return mlir::failure();
}
diff --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
index 1790f4b550a6..0c582ed4f100 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().has_value()) {
- if (!(expr = mlirGen(*ret.getExpr().value())))
+ if (!(expr = mlirGen(**ret.getExpr())))
return mlir::failure();
}
diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
index d5061d9adf0a..834836153002 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().has_value()) {
- if (!(expr = mlirGen(*ret.getExpr().value())))
+ if (!(expr = mlirGen(**ret.getExpr())))
return mlir::failure();
}
diff --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
index d5061d9adf0a..834836153002 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().has_value()) {
- if (!(expr = mlirGen(*ret.getExpr().value())))
+ if (!(expr = mlirGen(**ret.getExpr())))
return mlir::failure();
}
diff --git a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
index d5061d9adf0a..834836153002 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().has_value()) {
- if (!(expr = mlirGen(*ret.getExpr().value())))
+ if (!(expr = mlirGen(**ret.getExpr())))
return mlir::failure();
}
diff --git a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
index 93c9bd5997f7..ed367b84d817 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().has_value()) {
- if (!(expr = mlirGen(*ret.getExpr().value())))
+ if (!(expr = mlirGen(**ret.getExpr())))
return mlir::failure();
}