diff options
| author | ridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com> | 2022-08-10 09:16:20 -0700 |
|---|---|---|
| committer | ridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com> | 2022-08-11 16:04:08 -0700 |
| commit | 100882296e065526cfd055380e14334738da4158 (patch) | |
| tree | 46a23fbb6d11ff7b1a113c77880bd5d30b53ff21 /src/test/codegen | |
| parent | 20ffea6938b5839c390252e07940b99e3b6a889a (diff) | |
| download | rust-100882296e065526cfd055380e14334738da4158.tar.gz rust-100882296e065526cfd055380e14334738da4158.zip | |
Add support for generating unique *.profraw files by default when using the `-C instrument-coverage` flag.
Respond to PR comments.
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/instrument-coverage.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/codegen/instrument-coverage.rs b/src/test/codegen/instrument-coverage.rs new file mode 100644 index 00000000000..78f8875a2d9 --- /dev/null +++ b/src/test/codegen/instrument-coverage.rs @@ -0,0 +1,17 @@ +// Test that `-Cinstrument-coverage` creates expected __llvm_profile_filename symbol in LLVM IR. + +// needs-profiler-support +// compile-flags: -Cinstrument-coverage + +// CHECK: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}} + +#![crate_type="lib"] + +#[inline(never)] +fn some_function() { + +} + +pub fn some_other_function() { + some_function(); +} |
