From 88988c50f838cb53dc9a0f055045f2625dc6a302 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 26 Nov 2022 17:53:17 -0800 Subject: [PATCH] [Utils] Use std::optional in LoopPeel.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/Utils/LoopPeel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/LoopPeel.cpp b/llvm/lib/Transforms/Utils/LoopPeel.cpp index 4fa2fe2..e870409 100644 --- a/llvm/lib/Transforms/Utils/LoopPeel.cpp +++ b/llvm/lib/Transforms/Utils/LoopPeel.cpp @@ -42,6 +42,7 @@ #include #include #include +#include using namespace llvm; using namespace llvm::PatternMatch; @@ -163,7 +164,7 @@ public: Optional calculateIterationsToPeel(); protected: - using PeelCounter = Optional; + using PeelCounter = std::optional; const PeelCounter Unknown = None; // Add 1 respecting Unknown and return Unknown if result over MaxIterations -- 2.7.4