[llvm] df35a18 - [SCEV] Use ListSeparator (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 23:23:31 PST 2021
Author: Kazu Hirata
Date: 2021-02-16T23:23:05-08:00
New Revision: df35a183d7d447aa4f452ec1c56f9f04d4c02ee7
URL: https://github.com/llvm/llvm-project/commit/df35a183d7d447aa4f452ec1c56f9f04d4c02ee7
DIFF: https://github.com/llvm/llvm-project/commit/df35a183d7d447aa4f452ec1c56f9f04d4c02ee7.diff
LOG: [SCEV] Use ListSeparator (NFC)
Added:
Modified:
llvm/lib/Analysis/ScalarEvolution.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 13b07d74e52e..c6152f3deb1a 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -321,12 +321,9 @@ void SCEV::print(raw_ostream &OS) const {
llvm_unreachable("There are no other nary expression types.");
}
OS << "(";
- for (SCEVNAryExpr::op_iterator I = NAry->op_begin(), E = NAry->op_end();
- I != E; ++I) {
- OS << **I;
- if (std::next(I) != E)
- OS << OpStr;
- }
+ ListSeparator LS(OpStr);
+ for (const SCEV *Op : NAry->operands())
+ OS << LS << *Op;
OS << ")";
switch (NAry->getSCEVType()) {
case scAddExpr:
More information about the llvm-commits
mailing list