using "mir_body" (vs "body") in InstrumentCoverage
The mod uses both MIR bodies and HIR bodies, so I'm trying to maintain consistency with these names.
This commit is contained in:
parent
3d0192e7c8
commit
a045140268
1 changed files with 2 additions and 2 deletions
|
@ -25,11 +25,11 @@ pub struct InstrumentCoverage;
|
|||
/// constructing the arguments for `llvm.instrprof.increment`.
|
||||
pub(crate) fn provide(providers: &mut Providers<'_>) {
|
||||
providers.coverage_data = |tcx, def_id| {
|
||||
let body = tcx.optimized_mir(def_id);
|
||||
let mir_body = tcx.optimized_mir(def_id);
|
||||
let count_code_region_fn =
|
||||
tcx.require_lang_item(lang_items::CountCodeRegionFnLangItem, None);
|
||||
let mut num_counters: u32 = 0;
|
||||
for (_, data) in traversal::preorder(body) {
|
||||
for (_, data) in traversal::preorder(mir_body) {
|
||||
if let Some(terminator) = &data.terminator {
|
||||
if let TerminatorKind::Call { func: Operand::Constant(func), .. } = &terminator.kind
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue