Don't directly expose coverage::CounterMappingRegion via FFI
The definition of this struct changes in LLVM 12 due to the addition of branch coverage support. To avoid future mismatches, declare our own struct and then convert between them.
This commit is contained in:
parent
b763d9a40c
commit
1d280b012d
3 changed files with 26 additions and 8 deletions
|
@ -162,7 +162,7 @@ pub(crate) fn write_filenames_section_to_buffer<'a>(
|
|||
pub(crate) fn write_mapping_to_buffer(
|
||||
virtual_file_mapping: Vec<u32>,
|
||||
expressions: Vec<CounterExpression>,
|
||||
mut mapping_regions: Vec<CounterMappingRegion>,
|
||||
mapping_regions: Vec<CounterMappingRegion>,
|
||||
buffer: &RustString,
|
||||
) {
|
||||
unsafe {
|
||||
|
@ -171,7 +171,7 @@ pub(crate) fn write_mapping_to_buffer(
|
|||
virtual_file_mapping.len() as c_uint,
|
||||
expressions.as_ptr(),
|
||||
expressions.len() as c_uint,
|
||||
mapping_regions.as_mut_ptr(),
|
||||
mapping_regions.as_ptr(),
|
||||
mapping_regions.len() as c_uint,
|
||||
buffer,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue