diff options
author | Fangrui Song <i@maskray.me> | 2022-12-17 19:23:50 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-17 19:23:50 +0000 |
commit | 76b11003728dc1e37a28d69db81fb7952c7486e9 (patch) | |
tree | 6aad113f8fa1170ca42bed63a8719cea2bd0e4d0 /mlir/examples/toy/Ch5 | |
parent | cbb0981388b6b2c4ccc574a674841ecd517115e5 (diff) | |
download | llvm-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/toy/Ch5')
-rw-r--r-- | mlir/examples/toy/Ch5/mlir/MLIRGen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |