Update compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
This commit is contained in:
parent
a7bc1a2edf
commit
f75a236fe0
1 changed files with 4 additions and 4 deletions
|
@ -26,10 +26,10 @@ use tracing::debug;
|
||||||
/// undocumented details in Clang's implementation (that may or may not be important) were also
|
/// undocumented details in Clang's implementation (that may or may not be important) were also
|
||||||
/// replicated for Rust's Coverage Map.
|
/// replicated for Rust's Coverage Map.
|
||||||
pub fn finalize<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) {
|
pub fn finalize<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) {
|
||||||
if cx.coverage_context().is_none() {
|
let function_coverage_map = match cx.coverage_context() {
|
||||||
return;
|
Some(ctx) => ctx.take_function_coverage_map(),
|
||||||
}
|
None => return,
|
||||||
let function_coverage_map = cx.coverage_context().unwrap().take_function_coverage_map();
|
};
|
||||||
if function_coverage_map.is_empty() {
|
if function_coverage_map.is_empty() {
|
||||||
// This module has no functions with coverage instrumentation
|
// This module has no functions with coverage instrumentation
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue