File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 21
21
#include " llvm/ADT/STLExtras.h"
22
22
#include " llvm/ADT/SmallPtrSet.h"
23
23
#include " llvm/ADT/SmallVector.h"
24
+ #include " llvm/ADT/StringExtras.h"
24
25
#include " llvm/ADT/iterator.h"
25
26
#include " llvm/ADT/iterator_range.h"
26
27
#include " llvm/Analysis/AliasAnalysis.h"
@@ -2197,17 +2198,13 @@ void MemoryDef::print(raw_ostream &OS) const {
2197
2198
}
2198
2199
2199
2200
void MemoryPhi::print (raw_ostream &OS) const {
2200
- bool First = true ;
2201
+ ListSeparator LS ( " , " ) ;
2201
2202
OS << getID () << " = MemoryPhi(" ;
2202
2203
for (const auto &Op : operands ()) {
2203
2204
BasicBlock *BB = getIncomingBlock (Op);
2204
2205
MemoryAccess *MA = cast<MemoryAccess>(Op);
2205
- if (!First)
2206
- OS << ' ,' ;
2207
- else
2208
- First = false ;
2209
2206
2210
- OS << ' {' ;
2207
+ OS << LS << ' {' ;
2211
2208
if (BB->hasName ())
2212
2209
OS << BB->getName ();
2213
2210
else
You can’t perform that action at this time.
0 commit comments