Skip to content

Commit a587f42

Browse files
authored
[TableGen] SubtargetEmitter must use std::nullopt (#69475)
Use of llvm::Optional was migrated to std::optional. This included a change in the constructor of ArrayRef. However, there are still 2 places in the SubtargetEmitter which uses llvm::None, causing a compile error when emitted.
1 parent 8e810dc commit a587f42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/utils/TableGen/SubtargetEmitter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
19351935
if (NumProcs)
19361936
OS << Target << "SubTypeKV, ";
19371937
else
1938-
OS << "None, ";
1938+
OS << "std::nullopt, ";
19391939
OS << '\n'; OS.indent(22);
19401940
OS << Target << "WriteProcResTable, "
19411941
<< Target << "WriteLatencyTable, "
@@ -2028,7 +2028,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
20282028
if (NumProcs)
20292029
OS << "ArrayRef(" << Target << "SubTypeKV, " << NumProcs << "), ";
20302030
else
2031-
OS << "None, ";
2031+
OS << "std::nullopt, ";
20322032
OS << '\n'; OS.indent(24);
20332033
OS << Target << "WriteProcResTable, "
20342034
<< Target << "WriteLatencyTable, "

0 commit comments

Comments
 (0)