aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStack.cpp
diff options
context:
space:
mode:
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;
}