Skip to content

Commit b24737d

Browse files
authored
[NFC][RISCV] use OS.indent() to replace spaces (#102429)
1 parent 4357175 commit b24737d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/utils/TableGen/RISCVTargetDefEmitter.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ static void printExtensionTable(raw_ostream &OS,
3636
if (R->getValueAsBit("Experimental") != Experimental)
3737
continue;
3838

39-
OS << " {\"" << getExtensionName(R) << "\", {"
40-
<< R->getValueAsInt("MajorVersion") << ", "
41-
<< R->getValueAsInt("MinorVersion") << "}},\n";
39+
OS.indent(4) << "{\"" << getExtensionName(R) << "\", {"
40+
<< R->getValueAsInt("MajorVersion") << ", "
41+
<< R->getValueAsInt("MinorVersion") << "}},\n";
4242
}
4343

4444
OS << "};\n\n";
@@ -77,8 +77,8 @@ static void emitRISCVExtensions(RecordKeeper &Records, raw_ostream &OS) {
7777
if (!ImpliedExt->isSubClassOf("RISCVExtension"))
7878
continue;
7979

80-
OS << " { {\"" << Name << "\"}, \"" << getExtensionName(ImpliedExt)
81-
<< "\"},\n";
80+
OS.indent(4) << "{ {\"" << Name << "\"}, \""
81+
<< getExtensionName(ImpliedExt) << "\"},\n";
8282
}
8383
}
8484

@@ -236,10 +236,10 @@ static void emitRISCVExtensionBitmask(RecordKeeper &RK, raw_ostream &OS) {
236236
"duplicated bitmask");
237237
#endif
238238

239-
OS << " {"
240-
<< "\"" << ExtName << "\""
241-
<< ", " << GroupIDVal << ", " << BitPosVal << "ULL"
242-
<< "},\n";
239+
OS.indent(4) << "{"
240+
<< "\"" << ExtName << "\""
241+
<< ", " << GroupIDVal << ", " << BitPosVal << "ULL"
242+
<< "},\n";
243243
}
244244
OS << "};\n";
245245
OS << "#endif\n";

0 commit comments

Comments
 (0)