rust/compiler/rustc_codegen_llvm/src
bors ffb9b61294 Auto merge of #113430 - Zalathar:hash, r=b-naber
Remove `LLVMRustCoverageHashCString`

Coverage has two FFI functions for computing the hash of a byte string. One takes a ptr/len pair (`LLVMRustCoverageHashByteArray`), and the other takes a NUL-terminated C string (`LLVMRustCoverageHashCString`).

But on closer inspection, the C string version is unnecessary. The calling-side code converts a Rust `&str` into a `CString`, and the C++ code then immediately turns it back into a ptr/len string before actually hashing it. So we can just call the ptr/len version directly instead.

---

This PR also fixes a bug in the C++ declaration of `LLVMRustCoverageHashByteArray`. It should be `size_t`, since that's what is declared and passed on the Rust side, and it's what `StrRef`'s constructor expects to receive on the callee side.
2023-07-16 01:56:23 +00:00
..
back Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
coverageinfo Auto merge of #113430 - Zalathar:hash, r=b-naber 2023-07-16 01:56:23 +00:00
debuginfo refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
llvm Remove LLVMRustCoverageHashCString 2023-07-13 11:31:15 +10:00
abi.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
allocator.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
asm.rs Rollup merge of #111332 - loongarch-rs:inline-asm, r=Amanieu 2023-05-08 19:41:51 +09:00
attributes.rs Avoid an unnecessary use of SmallStr. 2023-06-29 11:37:12 +10:00
base.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
builder.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
callee.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
common.rs Reuse LLVMConstInBoundsGEP2 2023-07-10 00:20:56 -07:00
consts.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
context.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
declare.rs CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
errors.rs Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
intrinsic.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
lib.rs Revert "use new c literals instead of cstr! macro" 2023-07-05 13:11:27 +02:00
llvm_util.rs Create a structure to define the features from to_llvm_features. 2023-05-22 14:46:40 +01:00
mono_item.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
type_.rs add wasm eh intrinsics 2023-06-07 17:46:34 +02:00
type_of.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
va_arg.rs Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00