Skip to content

Commit 5cbe247

Browse files
committed
Update test to cover use of flags from new driver
1 parent fbb8b9e commit 5cbe247

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/Profiler/samplepgo.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
// Test the -profile-sample-use= flag using bogus data, to ensure it's actually
66
// reaching LLVM in the expected way.
77

8-
// RUN: %target-swift-frontend %t/program.swift -module-name test -emit-ir \
9-
// RUN: -O -profile-sample-use=%t/profile.txt -o %t/has-data.ll
8+
// RUN: %target-swiftc_driver -v %t/program.swift -module-name test -emit-ir \
9+
// RUN: -O -profile-sample-use=%t/profile.txt -o %t/has-data.ll \
10+
// RUN: > %t/flags.txt
11+
12+
// RUN: %FileCheck %s --check-prefix CHECK-STDERR --input-file %t/flags.txt
13+
// CHECK-STDERR: -Xllvm -sample-profile-use-profi
1014

11-
// RUN: %FileCheck %s < %t/has-data.ll
15+
// RUN: %FileCheck %s --input-file %t/has-data.ll
1216

1317
// CHECK: define{{.*}} @"$s4test8anythingyyF"() #[[ATTRID:[0-9]+]]
1418
// CHECK: attributes #[[ATTRID]] = {{.*}} "use-sample-profile"

0 commit comments

Comments
 (0)