Remove LLVMRustCoverageHashCString
Coverage has two FFI functions for computing the hash of a byte string. One takes a ptr/len pair, and the other takes a NUL-terminated C string. But on closer inspection, the C string version is unnecessary. The calling-side code converts a Rust `&str` into a C string, and the C++ code then immediately turns it back into a ptr/len string before actually hashing it.
This commit is contained in:
parent
7292608e21
commit
352d031599
4 changed files with 1 additions and 12 deletions
|
@ -238,7 +238,7 @@ fn save_function_record(
|
|||
let coverage_mapping_size = coverage_mapping_buffer.len();
|
||||
let coverage_mapping_val = cx.const_bytes(&coverage_mapping_buffer);
|
||||
|
||||
let func_name_hash = coverageinfo::hash_str(mangled_function_name);
|
||||
let func_name_hash = coverageinfo::hash_bytes(mangled_function_name.as_bytes());
|
||||
let func_name_hash_val = cx.const_u64(func_name_hash);
|
||||
let coverage_mapping_size_val = cx.const_u32(coverage_mapping_size as u32);
|
||||
let source_hash_val = cx.const_u64(source_hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue