From 3da96e0361f5b68340891d443c24d62a97af9767 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 23:49:50 -0800 Subject: [PATCH] [InstCombine] Use std::optional in InstructionCombining.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 --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index ee20520..e63c31b 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -110,6 +110,7 @@ #define DEBUG_TYPE "instcombine" #include "llvm/Transforms/Utils/InstructionWorklist.h" +#include using namespace llvm; using namespace llvm::PatternMatch; @@ -4244,7 +4245,7 @@ bool InstCombinerImpl::run() { // prove that the successor is not executed more frequently than our block. // Return the UserBlock if successful. auto getOptionalSinkBlockForInst = - [this](Instruction *I) -> Optional { + [this](Instruction *I) -> std::optional { if (!EnableCodeSinking) return None; -- 2.7.4