[Mlir-commits] [mlir] 0dc18b6 - [mlir] Use std::optional instead of llvm::Optional (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Tue Feb 14 20:44:22 PST 2023
Author: Kazu Hirata
Date: 2023-02-14T20:44:15-08:00
New Revision: 0dc18b6222f4f014203fa4747c8de3757bcd6d26
URL: https://github.com/llvm/llvm-project/commit/0dc18b6222f4f014203fa4747c8de3757bcd6d26
DIFF: https://github.com/llvm/llvm-project/commit/0dc18b6222f4f014203fa4747c8de3757bcd6d26.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/OpenMP/IR/OpenMPDialect.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index 79f339d26ad1e..38d91f62df1a1 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -24,6 +24,7 @@
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Frontend/OpenMP/OMPConstants.h"
#include <cstddef>
+#include <optional>
#include "mlir/Dialect/OpenMP/OpenMPOpsDialect.cpp.inc"
#include "mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc"
@@ -512,7 +513,7 @@ static void printDependVarList(OpAsmPrinter &p, Operation *op,
/// Verifies Depend clause
static LogicalResult verifyDependVarList(Operation *op,
- Optional<ArrayAttr> depends,
+ std::optional<ArrayAttr> depends,
OperandRange dependVars) {
if (!dependVars.empty()) {
if (!depends || depends->size() != dependVars.size())
More information about the Mlir-commits
mailing list