diff options
| author | bors <bors@rust-lang.org> | 2020-07-19 07:25:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-07-19 07:25:18 +0000 |
| commit | 47ea6d90b073ab977cf072e2f5f46d63de532cc6 (patch) | |
| tree | d408537bbf5d8d3063d19914f6e30efe02c74681 /src/librustc_codegen_llvm/attributes.rs | |
| parent | 0701419e96d94e5493c7ebfcecb66511ab0aa778 (diff) | |
| parent | a6f8b8a2116f0ea7e31d572d3120508678ed8079 (diff) | |
| download | rust-47ea6d90b073ab977cf072e2f5f46d63de532cc6.tar.gz rust-47ea6d90b073ab977cf072e2f5f46d63de532cc6.zip | |
Auto merge of #74091 - richkadel:llvm-coverage-map-gen-4, r=tmandry
Generating the coverage map @tmandry @wesleywiser rustc now generates the coverage map and can support (limited) coverage report generation, at the function level. Example commands to generate a coverage report: ```shell $ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu $ $BUILD/stage1/bin/rustc -Zinstrument-coverage \ $HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs $ LLVM_PROFILE_FILE="main.profraw" ./main called $ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata $ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main ```  r? @wesleywiser Rust compiler MCP rust-lang/compiler-team#278 Relevant issue: #34701 - Implement support for LLVMs code coverage instrumentation
Diffstat (limited to 'src/librustc_codegen_llvm/attributes.rs')
| -rw-r--r-- | src/librustc_codegen_llvm/attributes.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs index 89b548a9c5a..227a87ff819 100644 --- a/src/librustc_codegen_llvm/attributes.rs +++ b/src/librustc_codegen_llvm/attributes.rs @@ -133,6 +133,9 @@ fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) { return; } + // FIXME(richkadel): Make sure probestack plays nice with `-Z instrument-coverage` + // or disable it if not, similar to above early exits. + // Flag our internal `__rust_probestack` function as the stack probe symbol. // This is defined in the `compiler-builtins` crate for each architecture. llvm::AddFunctionAttrStringValue( |
