aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-10 10:55:02 -0800
committerKazu Hirata <kazu@google.com>2022-12-10 10:55:02 -0800
commitf3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4 (patch)
tree73b25e8a4beace0a0316081a4a7555f3a61ff954
parent8ada9cf777751a4a2f0db91a89226fa79a7e8323 (diff)
downloadllvm-f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4.zip
llvm-f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4.tar.gz
llvm-f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4.tar.bz2
[Transforms] Use std::optional in AsyncToAsyncRuntime.cpp (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-rw-r--r--mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index 3701a8b..49fe5b5 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -27,6 +27,7 @@
#include "mlir/Transforms/RegionUtils.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Support/Debug.h"
+#include <optional>
namespace mlir {
#define GEN_PASS_DEF_ASYNCTOASYNCRUNTIME
@@ -90,7 +91,7 @@ struct CoroMachinery {
Value coroHandle; // coroutine handle (!async.coro.getHandle value)
Block *entry; // coroutine entry block
- Optional<Block *> setError; // set returned values to error state
+ std::optional<Block *> setError; // set returned values to error state
Block *cleanup; // coroutine cleanup block
Block *suspend; // coroutine suspension block
};