diff options
| author | Kazu Hirata <kazu@google.com> | 2022-12-03 18:50:27 -0800 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2022-12-03 18:50:27 -0800 |
| commit | 1a36588ec64ae8576e531e6f0b49eadb90ab0b11 (patch) | |
| tree | 036b38c5b1cacbc8d914bd93987682fdebf36c0d /mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp | |
| parent | 1d650d4f1dd333c7053010368be446e28b059d99 (diff) | |
[mlir] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.
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
Diffstat (limited to 'mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp')
| -rw-r--r-- | mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp index e7d7873ab5cd..2c84e0b25c55 100644 --- a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp +++ b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp @@ -66,7 +66,7 @@ struct AssertOpLowering : public ConvertOpToLLVMPattern<cf::AssertOp> { // Generate IR to call `abort`. Block *failureBlock = rewriter.createBlock(opBlock->getParent()); - rewriter.create<LLVM::CallOp>(loc, abortFunc, llvm::None); + rewriter.create<LLVM::CallOp>(loc, abortFunc, std::nullopt); rewriter.create<LLVM::UnreachableOp>(loc); // Generate assertion test. |
