Skip to content

Commit 7292608

Browse files
committed
Fix the length parameter type of LLVMRustCoverageHashByteArray
The Rust-side declaration uses `libc::size_t` for the number of bytes, but the C++ declaration was using `unsigned` instead of `size_t`.
1 parent 7a5ad35 commit 7292608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ extern "C" uint64_t LLVMRustCoverageHashCString(const char *StrVal) {
165165

166166
extern "C" uint64_t LLVMRustCoverageHashByteArray(
167167
const char *Bytes,
168-
unsigned NumBytes) {
168+
size_t NumBytes) {
169169
StringRef StrRef(Bytes, NumBytes);
170170
return IndexedInstrProf::ComputeHash(StrRef);
171171
}

0 commit comments

Comments
 (0)