Skip to content

Commit

Permalink
Move coverageinfo::ffi and coverageinfo::map out of SSA
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed Jul 5, 2023
1 parent 9c430d3 commit cb570d6
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub use super::ffi::*;

use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::bug;
use rustc_middle::mir::coverage::{
CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionId,
InjectedExpressionIndex, MappedExpressionIndex, Op,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::common::CodegenCx;
use crate::coverageinfo;
use crate::coverageinfo::map_data::{Counter, CounterExpression};
use crate::llvm;

use llvm::coverageinfo::CounterMappingRegion;
use rustc_codegen_ssa::coverageinfo::map::{Counter, CounterExpression};
use rustc_codegen_ssa::traits::ConstMethods;
use rustc_data_structures::fx::FxIndexSet;
use rustc_hir::def::DefKind;
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::llvm;
use crate::abi::Abi;
use crate::builder::Builder;
use crate::common::CodegenCx;
use crate::coverageinfo::map_data::{CounterExpression, FunctionCoverage};

use libc::c_uint;
use llvm::coverageinfo::CounterMappingRegion;
use rustc_codegen_ssa::coverageinfo::map::{CounterExpression, FunctionCoverage};
use rustc_codegen_ssa::traits::{
BaseTypeMethods, BuilderMethods, ConstMethods, CoverageInfoBuilderMethods, MiscMethods,
StaticMethods,
Expand All @@ -28,6 +28,8 @@ use rustc_middle::ty::Instance;
use std::cell::RefCell;
use std::ffi::CString;

mod ffi;
pub(crate) mod map_data;
pub mod mapgen;

const UNUSED_FUNCTION_COUNTER_ID: CounterValueReference = CounterValueReference::START;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/llvm/ffi.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]

use rustc_codegen_ssa::coverageinfo::map as coverage_map;
use crate::coverageinfo::map_data as coverage_map;

use super::debuginfo::{
DIArray, DIBasicType, DIBuilder, DICompositeType, DIDerivedType, DIDescriptor, DIEnumerator,
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_codegen_ssa/src/coverageinfo/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pub mod back;
pub mod base;
pub mod codegen_attrs;
pub mod common;
pub mod coverageinfo;
pub mod debuginfo;
pub mod errors;
pub mod glue;
Expand Down

0 comments on commit cb570d6

Please sign in to comment.