[llvm] 214646d - [CodeGen] Use std::optional in ExpandMemCmp.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 26 14:30:01 PST 2022
Author: Kazu Hirata
Date: 2022-11-26T14:29:56-08:00
New Revision: 214646d6b5f7584887c21c655dcec65aa4182842
URL: https://github.com/llvm/llvm-project/commit/214646d6b5f7584887c21c655dcec65aa4182842
DIFF: https://github.com/llvm/llvm-project/commit/214646d6b5f7584887c21c655dcec65aa4182842.diff
LOG: [CodeGen] Use std::optional in ExpandMemCmp.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/CodeGen/ExpandMemCmp.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/ExpandMemCmp.cpp b/llvm/lib/CodeGen/ExpandMemCmp.cpp
index 7fd029663099..3838eaadd1d2 100644
--- a/llvm/lib/CodeGen/ExpandMemCmp.cpp
+++ b/llvm/lib/CodeGen/ExpandMemCmp.cpp
@@ -28,6 +28,7 @@
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/SizeOpts.h"
+#include <optional>
using namespace llvm;
@@ -877,7 +878,7 @@ ExpandMemCmpPass::runImpl(Function &F, const TargetLibraryInfo *TLI,
const TargetTransformInfo *TTI,
const TargetLowering *TL, ProfileSummaryInfo *PSI,
BlockFrequencyInfo *BFI, DominatorTree *DT) {
- Optional<DomTreeUpdater> DTU;
+ std::optional<DomTreeUpdater> DTU;
if (DT)
DTU.emplace(DT, DomTreeUpdater::UpdateStrategy::Lazy);
More information about the llvm-commits
mailing list