about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-07-07 17:19:41 +1000
committerZalathar <Zalathar@users.noreply.github.com>2023-07-13 11:31:15 +1000
commit7292608e213ddf64e2ecf69c6e074d7d67a2c9ec (patch)
tree5b626bf7e5c754b40d9cc9b6fc1ecc5c8f74ee1f /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent7a5ad35da4e5fd8cb4ec5bf181dbb75afd5dade9 (diff)
downloadrust-7292608e213ddf64e2ecf69c6e074d7d67a2c9ec.tar.gz
rust-7292608e213ddf64e2ecf69c6e074d7d67a2c9ec.zip
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`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
index 87906dee4d3..35f83cdb4f1 100644
--- a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
@@ -165,7 +165,7 @@ extern "C" uint64_t LLVMRustCoverageHashCString(const char *StrVal) {
 
 extern "C" uint64_t LLVMRustCoverageHashByteArray(
     const char *Bytes,
-    unsigned NumBytes) {
+    size_t NumBytes) {
   StringRef StrRef(Bytes, NumBytes);
   return IndexedInstrProf::ComputeHash(StrRef);
 }