File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
llvm/lib/Transforms/Instrumentation Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 1010
1111#include " llvm/ADT/SmallVector.h"
1212#include " llvm/ADT/Statistic.h"
13+ #include " llvm/ADT/StringExtras.h"
1314#include " llvm/ADT/StringRef.h"
1415#include " llvm/Analysis/OptimizationRemarkEmitter.h"
1516#include " llvm/Analysis/ProfileSummaryInfo.h"
@@ -184,22 +185,14 @@ void LowerAllowCheckPass::printPipeline(
184185 // correctness.
185186 // TODO: print shorter output by combining adjacent runs, etc.
186187 int i = 0 ;
187- bool printed = false ;
188+ ListSeparator LS ( " ; " ) ;
188189 for (unsigned int cutoff : Opts.cutoffs ) {
189- if (cutoff > 0 ) {
190- if (printed)
191- OS << " ;" ;
192- OS << " cutoffs[" << i << " ]=" << cutoff;
193- printed = true ;
194- }
195-
190+ if (cutoff > 0 )
191+ OS << LS << " cutoffs[" << i << " ]=" << cutoff;
196192 i++;
197193 }
198- if (Opts.runtime_check ) {
199- if (printed)
200- OS << " ;" ;
201- OS << " runtime_check=" << Opts.runtime_check ;
202- }
194+ if (Opts.runtime_check )
195+ OS << LS << " runtime_check=" << Opts.runtime_check ;
203196
204197 OS << ' >' ;
205198}
You can’t perform that action at this time.
0 commit comments