From 537d9c3aa684b3ef7e8fcbeb8139af6038cd0eaf Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 28 Jan 2021 22:21:16 -0800 Subject: [PATCH] [MustExecute] Use ListSeparator (NFC) --- lib/Analysis/MustExecute.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Analysis/MustExecute.cpp b/lib/Analysis/MustExecute.cpp index 1e7626013ee..5ca72f5f362 100644 --- a/lib/Analysis/MustExecute.cpp +++ b/lib/Analysis/MustExecute.cpp @@ -8,6 +8,7 @@ #include "llvm/Analysis/MustExecute.h" #include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" @@ -451,13 +452,9 @@ public: else OS << " ; (mustexec in: "; - bool first = true; - for (const Loop *L : Loops) { - if (!first) - OS << ", "; - first = false; - OS << L->getHeader()->getName(); - } + ListSeparator LS; + for (const Loop *L : Loops) + OS << LS << L->getHeader()->getName(); OS << ")"; } };