about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/traits
diff options
context:
space:
mode:
authorRich Kadel <richkadel@google.com>2020-07-24 21:14:28 -0700
committerRich Kadel <richkadel@google.com>2020-07-25 07:39:51 -0700
commit12ddd6073abecb7a515a43bee37408596e322345 (patch)
treeb7f3eaf24fe718c9b55581732a545ecd971021a3 /src/librustc_codegen_ssa/traits
parentc4e173472beb073ce3759525a15ed429b032787a (diff)
downloadrust-12ddd6073abecb7a515a43bee37408596e322345.tar.gz
rust-12ddd6073abecb7a515a43bee37408596e322345.zip
Fixed coverage map issues; better aligned with LLVM APIs
Found some problems with the coverage map encoding when testing with
more than one counter per function.

While debugging, I realized some better ways to structure the Rust
implementation of the coverage mapping generator. I refactored somewhat,
resulting in less code overall, expanded coverage of LLVM Coverage Map
capabilities, and much closer alignment with LLVM data structures, APIs,
and naming.

This should be easier to follow and easier to maintain.
Diffstat (limited to 'src/librustc_codegen_ssa/traits')
-rw-r--r--src/librustc_codegen_ssa/traits/coverageinfo.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_ssa/traits/coverageinfo.rs b/src/librustc_codegen_ssa/traits/coverageinfo.rs
index 1b9faa42484..db1d86c974e 100644
--- a/src/librustc_codegen_ssa/traits/coverageinfo.rs
+++ b/src/librustc_codegen_ssa/traits/coverageinfo.rs
@@ -1,5 +1,5 @@
 use super::BackendTypes;
-use crate::coverageinfo::CounterOp;
+use crate::coverageinfo::ExprKind;
 use rustc_middle::ty::Instance;
 
 pub trait CoverageInfoMethods: BackendTypes {
@@ -21,7 +21,7 @@ pub trait CoverageInfoBuilderMethods<'tcx>: BackendTypes {
         instance: Instance<'tcx>,
         index: u32,
         lhs: u32,
-        op: CounterOp,
+        op: ExprKind,
         rhs: u32,
         start_byte_pos: u32,
         end_byte_pos: u32,