Skip to content

Commit 2140260

Browse files
[mlir] Remove remaining uses of llvm::Optional (NFC)
This patch removes one "using" declaration and #include "llvm/ADT/Optional.h". It keeps several "using" declarations in headers for downstream users. 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
1 parent 0a81ace commit 2140260

File tree

22 files changed

+0
-22
lines changed

22 files changed

+0
-22
lines changed

mlir/examples/toy/Ch1/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/examples/toy/Ch2/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/examples/toy/Ch3/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/examples/toy/Ch4/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/examples/toy/Ch5/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/examples/toy/Ch6/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/examples/toy/Ch7/include/toy/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "toy/AST.h"
1818
#include "toy/Lexer.h"
1919

20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/ADT/StringExtras.h"
2322
#include "llvm/Support/raw_ostream.h"

mlir/include/mlir/Analysis/Presburger/Simplex.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "mlir/Analysis/Presburger/Utils.h"
2323
#include "mlir/Support/LogicalResult.h"
2424
#include "llvm/ADT/ArrayRef.h"
25-
#include "llvm/ADT/Optional.h"
2625
#include "llvm/ADT/SmallBitVector.h"
2726
#include "llvm/ADT/SmallVector.h"
2827
#include "llvm/Support/StringSaver.h"

mlir/include/mlir/Bindings/Python/PybindAdaptors.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "mlir-c/Bindings/Python/Interop.h"
2626
#include "mlir-c/IR.h"
2727

28-
#include "llvm/ADT/Optional.h"
2928
#include "llvm/ADT/Twine.h"
3029

3130
namespace py = pybind11;

mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "mlir/Dialect/Arith/IR/Arith.h"
1919
#include "mlir/IR/Value.h"
20-
#include "llvm/ADT/Optional.h"
2120
#include "llvm/ADT/SmallVector.h"
2221
#include <optional>
2322

0 commit comments

Comments
 (0)