aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStack.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:11 +0000
commite3b557809604d036af6e00c60f012c2025b59a5e (patch)
tree8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/CodeGen/SafeStack.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
-rw-r--r--llvm/lib/CodeGen/SafeStack.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp
index 00a551ade213..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 @@ public:
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
@@ -907,7 +908,7 @@ public:
} else {
// Otherwise, we need to compute it.
LazilyComputedDomTree.emplace(F);
- DT = LazilyComputedDomTree.getPointer();
+ DT = &*LazilyComputedDomTree;
ShouldPreserveDominatorTree = false;
}