1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[TableGen] Use ListSeparator (NFC)

This commit is contained in:
Kazu Hirata 2021-02-01 20:55:07 -08:00
parent ee92719619
commit 8694450fb2

View File

@ -141,13 +141,9 @@ void EmitInstrDocs(RecordKeeper &RK, raw_ostream &OS) {
FLAG(isAuthenticated) FLAG(isAuthenticated)
if (!FlagStrings.empty()) { if (!FlagStrings.empty()) {
OS << "Flags: "; OS << "Flags: ";
bool IsFirst = true; ListSeparator LS;
for (auto FlagString : FlagStrings) { for (auto FlagString : FlagStrings)
if (!IsFirst) OS << LS << "``" << FlagString << "``";
OS << ", ";
OS << "``" << FlagString << "``";
IsFirst = false;
}
OS << "\n\n"; OS << "\n\n";
} }
@ -192,26 +188,18 @@ void EmitInstrDocs(RecordKeeper &RK, raw_ostream &OS) {
// Implicit definitions. // Implicit definitions.
if (!II->ImplicitDefs.empty()) { if (!II->ImplicitDefs.empty()) {
OS << "Implicit defs: "; OS << "Implicit defs: ";
bool IsFirst = true; ListSeparator LS;
for (Record *Def : II->ImplicitDefs) { for (Record *Def : II->ImplicitDefs)
if (!IsFirst) OS << LS << "``" << Def->getName() << "``";
OS << ", ";
OS << "``" << Def->getName() << "``";
IsFirst = false;
}
OS << "\n\n"; OS << "\n\n";
} }
// Implicit uses. // Implicit uses.
if (!II->ImplicitUses.empty()) { if (!II->ImplicitUses.empty()) {
OS << "Implicit uses: "; OS << "Implicit uses: ";
bool IsFirst = true; ListSeparator LS;
for (Record *Use : II->ImplicitUses) { for (Record *Use : II->ImplicitUses)
if (!IsFirst) OS << LS << "``" << Use->getName() << "``";
OS << ", ";
OS << "``" << Use->getName() << "``";
IsFirst = false;
}
OS << "\n\n"; OS << "\n\n";
} }
@ -220,13 +208,9 @@ void EmitInstrDocs(RecordKeeper &RK, raw_ostream &OS) {
II->TheDef->getValueAsListOfDefs("Predicates"); II->TheDef->getValueAsListOfDefs("Predicates");
if (!Predicates.empty()) { if (!Predicates.empty()) {
OS << "Predicates: "; OS << "Predicates: ";
bool IsFirst = true; ListSeparator LS;
for (Record *P : Predicates) { for (Record *P : Predicates)
if (!IsFirst) OS << LS << "``" << P->getName() << "``";
OS << ", ";
OS << "``" << P->getName() << "``";
IsFirst = false;
}
OS << "\n\n"; OS << "\n\n";
} }
} }