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