[llvm] 6288a09 - [Scalar] Use std::optional in ScalarizeMaskedMemIntrin.cpp (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 26 17:39:41 PST 2022


Author: Kazu Hirata
Date: 2022-11-26T17:39:36-08:00
New Revision: 6288a09c94b267edd532c284b797f80ebfa8a948

URL: https://github.com/llvm/llvm-project/commit/6288a09c94b267edd532c284b797f80ebfa8a948
DIFF: https://github.com/llvm/llvm-project/commit/6288a09c94b267edd532c284b797f80ebfa8a948.diff

LOG: [Scalar] Use std::optional in ScalarizeMaskedMemIntrin.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/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp b/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
index cda9be6daecc..1c8e4e3512dc 100644
--- a/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
@@ -35,6 +35,7 @@
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include <cassert>
+#include <optional>
 
 using namespace llvm;
 
@@ -861,7 +862,7 @@ static void scalarizeMaskedCompressStore(const DataLayout &DL, CallInst *CI,
 
 static bool runImpl(Function &F, const TargetTransformInfo &TTI,
                     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