[llvm] d77ecb6 - [CodeGen] Use std::optional in SafeStack.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 26 14:57:49 PST 2022
Author: Kazu Hirata
Date: 2022-11-26T14:57:44-08:00
New Revision: d77ecb675b647b54ba142be043b17139f62be6f7
URL: https://github.com/llvm/llvm-project/commit/d77ecb675b647b54ba142be043b17139f62be6f7
DIFF: https://github.com/llvm/llvm-project/commit/d77ecb675b647b54ba142be043b17139f62be6f7.diff
LOG: [CodeGen] Use std::optional in SafeStack.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/CodeGen/SafeStack.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp
index 0e65a0bd52da..bcad7a3f24da 100644
--- a/llvm/lib/CodeGen/SafeStack.cpp
+++ b/llvm/lib/CodeGen/SafeStack.cpp
@@ -67,6 +67,7 @@
#include <algorithm>
#include <cassert>
#include <cstdint>
+#include <optional>
#include <string>
#include <utility>
@@ -896,7 +897,7 @@ class SafeStackLegacyPass : public FunctionPass {
DominatorTree *DT;
bool ShouldPreserveDominatorTree;
- Optional<DominatorTree> LazilyComputedDomTree;
+ std::optional<DominatorTree> LazilyComputedDomTree;
// Do we already have a DominatorTree avaliable from the previous pass?
// Note that we should *NOT* require it, to avoid the case where we end up
More information about the llvm-commits
mailing list