[Mlir-commits] [mlir] 743dd4d - [mlir] Use std::optional instead of llvm::Optional (NFC)

Kazu Hirata llvmlistbot at llvm.org
Fri May 26 13:58:31 PDT 2023


Author: Kazu Hirata
Date: 2023-05-26T13:58:20-07:00
New Revision: 743dd4dbd1a32808e024fe653b5c3ecc9b50325a

URL: https://github.com/llvm/llvm-project/commit/743dd4dbd1a32808e024fe653b5c3ecc9b50325a
DIFF: https://github.com/llvm/llvm-project/commit/743dd4dbd1a32808e024fe653b5c3ecc9b50325a.diff

LOG: [mlir] Use std::optional instead of llvm::Optional (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/MemRef/IR/MemRefMemorySlot.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefMemorySlot.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefMemorySlot.cpp
index faffe9a5969eb..bd15d6455f5ab 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefMemorySlot.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefMemorySlot.cpp
@@ -114,7 +114,7 @@ memref::AllocaOp::getDestructurableSlots() {
   if (!destructurable)
     return {};
 
-  Optional<DenseMap<Attribute, Type>> destructuredType =
+  std::optional<DenseMap<Attribute, Type>> destructuredType =
       destructurable.getSubelementIndexMap();
   if (!destructuredType)
     return {};


        


More information about the Mlir-commits mailing list