From f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 10 Dec 2022 10:55:02 -0800 Subject: [PATCH] [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 --- mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 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 setError; // set returned values to error state + std::optional setError; // set returned values to error state Block *cleanup; // coroutine cleanup block Block *suspend; // coroutine suspension block }; -- 2.7.4