[llvm] 3ee6f7c - [Coroutines] Use std::optional in CoroFrame.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 08:27:41 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T08:27:36-08:00
New Revision: 3ee6f7cf65670e22fb2d2786a3dcfc566197bcb8
URL: https://github.com/llvm/llvm-project/commit/3ee6f7cf65670e22fb2d2786a3dcfc566197bcb8
DIFF: https://github.com/llvm/llvm-project/commit/3ee6f7cf65670e22fb2d2786a3dcfc566197bcb8.diff
LOG: [Coroutines] Use std::optional in CoroFrame.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:
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
index 5c0554fb58bc7..114d18b16ebde 100644
--- a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
@@ -1428,7 +1428,7 @@ struct AllocaUseVisitor : PtrUseVisitor<AllocaUseVisitor> {
bool MayWriteBeforeCoroBegin{false};
bool ShouldUseLifetimeStartInfo{true};
- mutable llvm::Optional<bool> ShouldLiveOnFrame{};
+ mutable std::optional<bool> ShouldLiveOnFrame{};
bool computeShouldLiveOnFrame() const {
// If lifetime information is available, we check it first since it's
More information about the llvm-commits
mailing list