[llvm] 68db727 - [Analysis] Use std::optional in LoopAnalysisManager.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 10:28:59 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T10:28:54-08:00
New Revision: 68db72714f533676410e121ad87ecb15ace81a76
URL: https://github.com/llvm/llvm-project/commit/68db72714f533676410e121ad87ecb15ace81a76
DIFF: https://github.com/llvm/llvm-project/commit/68db72714f533676410e121ad87ecb15ace81a76.diff
LOG: [Analysis] Use std::optional in LoopAnalysisManager.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
Added:
Modified:
llvm/lib/Analysis/LoopAnalysisManager.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/LoopAnalysisManager.cpp b/llvm/lib/Analysis/LoopAnalysisManager.cpp
index 8d71b31ca393..74b1da86eb28 100644
--- a/llvm/lib/Analysis/LoopAnalysisManager.cpp
+++ b/llvm/lib/Analysis/LoopAnalysisManager.cpp
@@ -13,6 +13,7 @@
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/PassManagerImpl.h"
+#include <optional>
using namespace llvm;
@@ -90,7 +91,7 @@ bool LoopAnalysisManagerFunctionProxy::Result::invalidate(
// cache and so we walk the preorder list in reverse to form a valid
// postorder.
for (Loop *L : reverse(PreOrderLoops)) {
- Optional<PreservedAnalyses> InnerPA;
+ std::optional<PreservedAnalyses> InnerPA;
// Check to see whether the preserved set needs to be adjusted based on
// function-level analysis invalidation triggering deferred invalidation
More information about the llvm-commits
mailing list