Skip to content

Commit b658bbe

Browse files
committed
Use ListSeparator
1 parent 031ef3f commit b658bbe

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clang/lib/Support/RISCVVIntrinsicUtils.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,13 +1243,10 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require) {
12431243
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
12441244
const RequiredExtensions &Exts) {
12451245
OS << "{";
1246-
const char *Sep = "";
1247-
for (unsigned I = 0; I < RVV_REQ_NUM; I++) {
1248-
if (Exts[I]) {
1249-
OS << Sep << static_cast<RVVRequire>(I);
1250-
Sep = ", ";
1251-
}
1252-
}
1246+
ListSeparator LS;
1247+
for (unsigned I = 0; I < RVV_REQ_NUM; I++)
1248+
if (Exts[I])
1249+
OS << LS << static_cast<RVVRequire>(I);
12531250
OS << "}";
12541251
return OS;
12551252
}

0 commit comments

Comments
 (0)