Skip to content

Commit ebabcf7

Browse files
Make test/codegen/pgo-instrumentation.rs work reliably on Windows.
1 parent 9f92668 commit ebabcf7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
+7-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
// Test that `-Zpgo-gen` creates expected instrumentation artifacts in LLVM IR.
2+
// Compiling with `-Cpanic=abort` because PGO+unwinding isn't supported on all platforms.
23

34
// needs-profiler-support
4-
// compile-flags: -Z pgo-gen -Ccodegen-units=1
5+
// compile-flags: -Z pgo-gen -Ccodegen-units=1 -Cpanic=abort
56

67
// CHECK: @__llvm_profile_raw_version =
78
// CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = private global
89
// CHECK: @__profd_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = private global
9-
// CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}main{{.*}} = private global
10-
// CHECK: @__profd_{{.*}}pgo_instrumentation{{.*}}main{{.*}} = private global
10+
// CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}some_other_function{{.*}} = private global
11+
// CHECK: @__profd_{{.*}}pgo_instrumentation{{.*}}some_other_function{{.*}} = private global
1112
// CHECK: @__llvm_profile_filename = {{.*}}"default_%m.profraw\00"{{.*}}
1213

14+
#![crate_type="lib"]
15+
1316
#[inline(never)]
1417
fn some_function() {
1518

1619
}
1720

18-
fn main() {
21+
pub fn some_other_function() {
1922
some_function();
2023
}

0 commit comments

Comments
 (0)