Skip to content

Commit 397f2e9

Browse files
Remove llvm::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 Differential Revision: https://reviews.llvm.org/D149128
1 parent 92180da commit 397f2e9

File tree

3 files changed

+1
-62
lines changed

3 files changed

+1
-62
lines changed

llvm/include/llvm/ADT/None.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

llvm/include/llvm/ADT/Optional.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

mlir/include/mlir/Support/LLVM.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
#ifndef MLIR_SUPPORT_LLVM_H
1919
#define MLIR_SUPPORT_LLVM_H
2020

21-
// We include these two headers because they cannot be practically forward
21+
// We include this header because it cannot be practically forward
2222
// declared, and are effectively language features.
23-
#include "llvm/ADT/None.h"
2423
#include "llvm/Support/Casting.h"
2524
#include <vector>
2625

@@ -58,7 +57,6 @@ class DenseSet;
5857
class MallocAllocator;
5958
template <typename T>
6059
class MutableArrayRef;
61-
template <typename T> using Optional = std::optional<T>;
6260
template <typename... PT>
6361
class PointerUnion;
6462
template <typename T, typename Vector, typename Set>
@@ -130,7 +128,6 @@ using SetVector = llvm::SetVector<T, Vector, Set>;
130128
template <typename AllocatorTy = llvm::MallocAllocator>
131129
using StringSet = llvm::StringSet<AllocatorTy>;
132130
using llvm::MutableArrayRef;
133-
using llvm::Optional;
134131
using llvm::PointerUnion;
135132
using llvm::SmallPtrSet;
136133
using llvm::SmallPtrSetImpl;

0 commit comments

Comments
 (0)