From 9addf0651c2fc9174824ea7e28c2651c780ae968 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 9 May 2023 18:38:47 +1000 Subject: [PATCH] Correctly mark parameter `RustMappingRegions` as pointer-to-`const` The regions don't need to be mutable because we pass a copy of them to LLVM instead, and this matches the `*const` in the Rust-side signature. --- compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp index 38fcd0527da91..87906dee4d348 100644 --- a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp @@ -121,7 +121,7 @@ extern "C" void LLVMRustCoverageWriteMappingToBuffer( unsigned NumVirtualFileMappingIDs, const LLVMRustCounterExpression *RustExpressions, unsigned NumExpressions, - LLVMRustCounterMappingRegion *RustMappingRegions, + const LLVMRustCounterMappingRegion *RustMappingRegions, unsigned NumMappingRegions, RustStringRef BufferOut) { // Convert from FFI representation to LLVM representation.