Skip to content

Commit d3cab55

Browse files
committed
Use make_second_range to skip over keys
1 parent f5720ef commit d3cab55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/utils/TableGen/SearchableTableEmitter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ void SearchableTableEmitter::emitGenericEnum(const GenericEnum &Enum,
320320
emitIfdef((Twine("GET_") + Enum.PreprocessorGuard + "_DECL").str(), OS);
321321

322322
OS << "enum " << Enum.Name << " {\n";
323-
for (const auto &[_, Entry] : Enum.Entries.getArrayRef())
324-
OS << " " << Entry.Name << " = " << Entry.Value << ",\n";
323+
for (const auto &[Name, Value] :
324+
make_second_range(Enum.Entries.getArrayRef()))
325+
OS << " " << Name << " = " << Value << ",\n";
325326
OS << "};\n";
326327

327328
OS << "#endif\n\n";

0 commit comments

Comments
 (0)