[Mlir-commits] [mlir] f3b7b30 - [Transforms] Use std::optional in AsyncToAsyncRuntime.cpp (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Sat Dec 10 10:55:08 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T10:55:02-08:00
New Revision: f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4
URL: https://github.com/llvm/llvm-project/commit/f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4
DIFF: https://github.com/llvm/llvm-project/commit/f3b7b300f2b8f06fb03a715aa8dd2a7fcd9658f4.diff
LOG: [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
Added:
Modified:
mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index 3701a8b48f92b..49fe5b5cfe110 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
};
More information about the Mlir-commits
mailing list