diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:11 +0000 |
| commit | e3b557809604d036af6e00c60f012c2025b59a5e (patch) | |
| tree | 8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/CodeGen/IndirectBrExpandPass.cpp | |
| parent | 08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff) | |
Diffstat (limited to 'llvm/lib/CodeGen/IndirectBrExpandPass.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/IndirectBrExpandPass.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp index 5be98e114673..012892166ae7 100644 --- a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp +++ b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp @@ -40,6 +40,7 @@ #include "llvm/Pass.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetMachine.h" +#include <optional> using namespace llvm; @@ -90,7 +91,7 @@ bool IndirectBrExpandPass::runOnFunction(Function &F) { return false; TLI = STI.getTargetLowering(); - Optional<DomTreeUpdater> DTU; + std::optional<DomTreeUpdater> DTU; if (auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>()) DTU.emplace(DTWP->getDomTree(), DomTreeUpdater::UpdateStrategy::Lazy); @@ -198,7 +199,7 @@ bool IndirectBrExpandPass::runOnFunction(Function &F) { CommonITy = ITy; } - auto GetSwitchValue = [DL, CommonITy](IndirectBrInst *IBr) { + auto GetSwitchValue = [CommonITy](IndirectBrInst *IBr) { return CastInst::CreatePointerCast( IBr->getAddress(), CommonITy, Twine(IBr->getAddress()->getName()) + ".switch_cast", IBr); |
