Skip to content

Commit a1fe1f5

Browse files
[mlir] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with 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
1 parent a3e975d commit a1fe1f5

File tree

223 files changed

+223
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+223
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/Support/Casting.h"
2323
#include <utility>
2424
#include <vector>
25+
#include <optional>
2526

2627
namespace toy {
2728

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <map>
2626
#include <utility>
2727
#include <vector>
28+
#include <optional>
2829

2930
namespace toy {
3031

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/Support/Casting.h"
2323
#include <utility>
2424
#include <vector>
25+
#include <optional>
2526

2627
namespace toy {
2728

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <map>
2626
#include <utility>
2727
#include <vector>
28+
#include <optional>
2829

2930
namespace toy {
3031

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/Support/Casting.h"
2323
#include <utility>
2424
#include <vector>
25+
#include <optional>
2526

2627
namespace toy {
2728

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <map>
2626
#include <utility>
2727
#include <vector>
28+
#include <optional>
2829

2930
namespace toy {
3031

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/Support/Casting.h"
2323
#include <utility>
2424
#include <vector>
25+
#include <optional>
2526

2627
namespace toy {
2728

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <map>
2626
#include <utility>
2727
#include <vector>
28+
#include <optional>
2829

2930
namespace toy {
3031

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/Support/Casting.h"
2323
#include <utility>
2424
#include <vector>
25+
#include <optional>
2526

2627
namespace toy {
2728

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <map>
2626
#include <utility>
2727
#include <vector>
28+
#include <optional>
2829

2930
namespace toy {
3031

0 commit comments

Comments
 (0)