Skip to content

Commit df35a18

Browse files
[SCEV] Use ListSeparator (NFC)
1 parent caff023 commit df35a18

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,9 @@ void SCEV::print(raw_ostream &OS) const {
321321
llvm_unreachable("There are no other nary expression types.");
322322
}
323323
OS << "(";
324-
for (SCEVNAryExpr::op_iterator I = NAry->op_begin(), E = NAry->op_end();
325-
I != E; ++I) {
326-
OS << **I;
327-
if (std::next(I) != E)
328-
OS << OpStr;
329-
}
324+
ListSeparator LS(OpStr);
325+
for (const SCEV *Op : NAry->operands())
326+
OS << LS << *Op;
330327
OS << ")";
331328
switch (NAry->getSCEVType()) {
332329
case scAddExpr:

0 commit comments

Comments
 (0)