about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/context.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-31 12:35:56 +0100
committerGitHub <noreply@github.com>2024-10-31 12:35:56 +0100
commitbfc956e36ff42e8699ff794297317880e80eedad (patch)
treeb97eba429f23115e617ffdb7d6b27839181b0bc3 /compiler/rustc_codegen_llvm/src/context.rs
parent6b96a7944a8de94eb0d80881c765e7052dbc03bd (diff)
parent8dddd1ae603756ef4957320880115ecc65d706a5 (diff)
downloadrust-bfc956e36ff42e8699ff794297317880e80eedad.tar.gz
rust-bfc956e36ff42e8699ff794297317880e80eedad.zip
Rollup merge of #132395 - Zalathar:coverage-cx-ice, r=jieyouxu
coverage: Avoid ICE when `coverage_cx` is unexpectedly unavailable

In #132124, `coverage_cx()` was changed to panic if the context was unavailable, under the assumption that it would always be available whenever coverage instrumentation is enabled.

However, there have been reports of this change causing ICEs in `polars` CI.

I don't yet understand why this is happening, but for now it seems wisest to revert that part of the change, restoring the two early returns that had been replaced with panics.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index 9778ff4918c..313957dda96 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -554,6 +554,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
 
     /// Extra state that is only available when coverage instrumentation is enabled.
     #[inline]
+    #[track_caller]
     pub(crate) fn coverage_cx(&self) -> &coverageinfo::CrateCoverageContext<'ll, 'tcx> {
         self.coverage_cx.as_ref().expect("only called when coverage instrumentation is enabled")
     }