[Mlir-commits] [mlir] 4b0e116 - [Analysis] Use std::optional in	AffineStructures.cpp (NFC)
    Kazu Hirata 
    llvmlistbot at llvm.org
       
    Sat Dec 10 10:44:56 PST 2022
    
    
  
Author: Kazu Hirata
Date: 2022-12-10T10:44:51-08:00
New Revision: 4b0e11679c67ab27935a0fffff467adfcb23b309
URL: https://github.com/llvm/llvm-project/commit/4b0e11679c67ab27935a0fffff467adfcb23b309
DIFF: https://github.com/llvm/llvm-project/commit/4b0e11679c67ab27935a0fffff467adfcb23b309.diff
LOG: [Analysis] Use std::optional in AffineStructures.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: 
    mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
Removed: 
    
################################################################################
diff  --git a/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp b/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
index 15b50a4f0ae6a..39f3a1d2a4e8b 100644
--- a/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
@@ -26,6 +26,7 @@
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
+#include <optional>
 
 #define DEBUG_TYPE "affine-structures"
 
@@ -1105,7 +1106,7 @@ void FlatAffineValueConstraints::getSliceBounds(
   // Set the lower and upper bound maps for all the variables that were
   // computed as affine expressions of the rest as the "detected expr" and
   // "detected expr + 1" respectively; set the undetected ones to null.
-  Optional<FlatAffineValueConstraints> tmpClone;
+  std::optional<FlatAffineValueConstraints> tmpClone;
   for (unsigned pos = 0; pos < num; pos++) {
     unsigned numMapDims = getNumDimVars() - num;
     unsigned numMapSymbols = getNumSymbolVars();
        
    
    
More information about the Mlir-commits
mailing list