File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
// 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.
2
3
3
4
// needs-profiler-support
4
- // compile-flags: -Z pgo-gen -Ccodegen-units=1
5
+ // compile-flags: -Z pgo-gen -Ccodegen-units=1 -Cpanic=abort
5
6
6
7
// CHECK: @__llvm_profile_raw_version =
7
8
// CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = private global
8
9
// 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
11
12
// CHECK: @__llvm_profile_filename = {{.*}}"default_%m.profraw\00"{{.*}}
12
13
14
+ #![ crate_type="lib" ]
15
+
13
16
#[ inline( never) ]
14
17
fn some_function ( ) {
15
18
16
19
}
17
20
18
- fn main ( ) {
21
+ pub fn some_other_function ( ) {
19
22
some_function ( ) ;
20
23
}
You can’t perform that action at this time.
0 commit comments