about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-06-29 12:14:04 +1000
committerZalathar <Zalathar@users.noreply.github.com>2023-08-01 11:29:55 +1000
commitf103db894fdcf94822d57cf28e30bc498c042631 (patch)
tree461dacc5e3344fe5662639681a58d54f84c3b1ee /compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
parent1a014d42f45de1b829ca7916d8f639fda6e0770a (diff)
downloadrust-f103db894fdcf94822d57cf28e30bc498c042631.tar.gz
rust-f103db894fdcf94822d57cf28e30bc498c042631.zip
Make coverage expression IDs count up from 0, not down from `u32::MAX`
Operand types are now tracked explicitly, so there is no need for expression
IDs to avoid counter IDs by descending from `u32::MAX`. Instead they can just
count up from 0, and can be used directly as indices when necessary.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
index d6a32497f7f..5e0c5df2bcb 100644
--- a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
@@ -17,7 +17,7 @@ use rustc_hir::def_id::DefId;
 use rustc_llvm::RustString;
 use rustc_middle::bug;
 use rustc_middle::mir::coverage::{
-    CodeRegion, CounterValueReference, CoverageKind, InjectedExpressionId, Op, Operand,
+    CodeRegion, CounterValueReference, CoverageKind, ExpressionId, Op, Operand,
 };
 use rustc_middle::mir::Coverage;
 use rustc_middle::ty;
@@ -202,7 +202,7 @@ impl<'tcx> Builder<'_, '_, 'tcx> {
     fn add_coverage_counter_expression(
         &mut self,
         instance: Instance<'tcx>,
-        id: InjectedExpressionId,
+        id: ExpressionId,
         lhs: Operand,
         op: Op,
         rhs: Operand,