Skip to content

Commit

Permalink
[TableGen] SubtargetEmitter must use std::nullopt (#69475)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
redstar authored Oct 18, 2023
1 parent 8e810dc commit a587f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/utils/TableGen/SubtargetEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
if (NumProcs)
OS << Target << "SubTypeKV, ";
else
OS << "None, ";
OS << "std::nullopt, ";
OS << '\n'; OS.indent(22);
OS << Target << "WriteProcResTable, "
<< Target << "WriteLatencyTable, "
Expand Down Expand Up @@ -2028,7 +2028,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
if (NumProcs)
OS << "ArrayRef(" << Target << "SubTypeKV, " << NumProcs << "), ";
else
OS << "None, ";
OS << "std::nullopt, ";
OS << '\n'; OS.indent(24);
OS << Target << "WriteProcResTable, "
<< Target << "WriteLatencyTable, "
Expand Down

0 comments on commit a587f42

Please sign in to comment.