diff options
| author | Rich Kadel <richkadel@google.com> | 2020-11-23 12:56:07 -0800 |
|---|---|---|
| committer | Rich Kadel <richkadel@google.com> | 2020-11-23 15:14:47 -0800 |
| commit | 1d8c381c014f202eeae59994b9b664841e91cb72 (patch) | |
| tree | de0e8a07e39a98efff17451086877681b65cb5b5 /compiler/rustc_codegen_llvm/src/llvm/ffi.rs | |
| parent | 40624dde6cdfad2576b4d795c97583188a814884 (diff) | |
| download | rust-1d8c381c014f202eeae59994b9b664841e91cb72.tar.gz rust-1d8c381c014f202eeae59994b9b664841e91cb72.zip | |
Upgrades the coverage map to Version 4
Changes the coverage map injected into binaries compiled with `-Zinstrument-coverage` to LLVM Coverage Mapping Format, Version 4 (from Version 3). Note, binaries compiled with this version will require LLVM tools from at least LLVM Version 11.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 8b15c8b0eb6..69a37dba0f1 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1791,10 +1791,14 @@ extern "C" { pub fn LLVMRustCoverageCreatePGOFuncNameVar(F: &'a Value, FuncName: *const c_char) -> &'a Value; - pub fn LLVMRustCoverageComputeHash(Name: *const c_char) -> u64; + pub fn LLVMRustCoverageHashCString(StrVal: *const c_char) -> u64; + pub fn LLVMRustCoverageHashByteArray(Bytes: *const c_char, NumBytes: size_t) -> u64; #[allow(improper_ctypes)] - pub fn LLVMRustCoverageWriteSectionNameToString(M: &Module, Str: &RustString); + pub fn LLVMRustCoverageWriteMapSectionNameToString(M: &Module, Str: &RustString); + + #[allow(improper_ctypes)] + pub fn LLVMRustCoverageWriteFuncSectionNameToString(M: &Module, Str: &RustString); #[allow(improper_ctypes)] pub fn LLVMRustCoverageWriteMappingVarNameToString(Str: &RustString); |
