Skip to content

Commit 60a18d6

Browse files
authored
[LowerAllowCheckPass] fix pipeline printing (#146000)
1 parent 0cde5a8 commit 60a18d6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,13 @@ void LowerAllowCheckPass::printPipeline(
182182
// correctness.
183183
// TODO: print shorter output by combining adjacent runs, etc.
184184
int i = 0;
185+
bool printed = false;
185186
for (unsigned int cutoff : Opts.cutoffs) {
186187
if (cutoff > 0) {
187-
if (i > 0)
188+
if (printed)
188189
OS << ";";
189190
OS << "cutoffs[" << i << "]=" << cutoff;
191+
printed = true;
190192
}
191193

192194
i++;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; RUN: opt < %s -passes='require<profile-summary>,function(lower-allow-check<cutoffs[7]=0;cutoffs[8]=1>)' -S -o - -print-pipeline-passes | FileCheck %s
2+
3+
; CHECK: lower-allow-check<cutoffs[8]=1>

0 commit comments

Comments
 (0)