Commit 19cf9f6
Automerge: [mlir] Migrate away from TypeRange(std::nullopt) (NFC) (#145246)
ArrayRef has a constructor that accepts std::nullopt. This
constructor dates back to the days when we still had llvm::Optional.
Since the use of std::nullopt outside the context of std::optional is
kind of abuse and not intuitive to new comers, I would like to move
away from the constructor and eventually remove it.
One of the uses of std::nullopt is in a the constructors for
TypeRange. This patch takes care of the migration where we need
TypeRange() to facilitate perfect forwarding. Note that {} would be
ambiguous for perfecting forwarding to work.File tree
3 files changed
+4
-4
lines changed- mlir
- lib/Conversion
- SCFToGPU
- SPIRVToLLVM
- test/lib/Dialect/Test
3 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
842 | | - | |
| 842 | + | |
843 | 843 | | |
844 | 844 | | |
845 | 845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | | - | |
| 1011 | + | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | | - | |
| 1027 | + | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
| |||
0 commit comments