2022-08-10 09:16:20 -07:00
|
|
|
// Test that `-Cinstrument-coverage` creates expected __llvm_profile_filename symbol in LLVM IR.
|
|
|
|
|
2024-03-16 17:02:30 +11:00
|
|
|
//@ compile-flags: -Zno-profiler-runtime
|
2024-04-24 22:06:54 +02:00
|
|
|
//@ revisions: default y yes on true_ all
|
2023-10-22 17:05:27 +11:00
|
|
|
//@ [default] compile-flags: -Cinstrument-coverage
|
|
|
|
//@ [y] compile-flags: -Cinstrument-coverage=y
|
|
|
|
//@ [yes] compile-flags: -Cinstrument-coverage=yes
|
|
|
|
//@ [on] compile-flags: -Cinstrument-coverage=on
|
2024-04-24 22:06:54 +02:00
|
|
|
//@ [true_] compile-flags: -Cinstrument-coverage=true
|
2023-10-22 17:05:27 +11:00
|
|
|
//@ [all] compile-flags: -Cinstrument-coverage=all
|
2022-08-10 09:16:20 -07:00
|
|
|
|
2024-03-16 17:02:30 +11:00
|
|
|
// CHECK-DAG: @__llvm_coverage_mapping
|
|
|
|
// CHECK-DAG: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}}
|
2022-08-10 09:16:20 -07:00
|
|
|
|
2024-05-29 14:11:20 +10:00
|
|
|
#![crate_type = "lib"]
|
2022-08-10 09:16:20 -07:00
|
|
|
|
|
|
|
#[inline(never)]
|
2024-05-29 14:11:20 +10:00
|
|
|
fn some_function() {}
|
2022-08-10 09:16:20 -07:00
|
|
|
|
|
|
|
pub fn some_other_function() {
|
|
|
|
some_function();
|
|
|
|
}
|