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.
This commit is contained in:
@@ -220,12 +220,24 @@ pub fn set_linkage(llglobal: &Value, linkage: Linkage) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_visibility(llglobal: &Value, visibility: Visibility) {
|
||||
unsafe {
|
||||
LLVMRustSetVisibility(llglobal, visibility);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_alignment(llglobal: &Value, bytes: usize) {
|
||||
unsafe {
|
||||
ffi::LLVMSetAlignment(llglobal, bytes as c_uint);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_comdat(llmod: &Module, llglobal: &Value, name: &str) {
|
||||
unsafe {
|
||||
LLVMRustSetComdat(llmod, llglobal, name.as_ptr().cast(), name.len());
|
||||
}
|
||||
}
|
||||
|
||||
/// Safe wrapper around `LLVMGetParam`, because segfaults are no fun.
|
||||
pub fn get_param(llfn: &Value, index: c_uint) -> &Value {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user