1
Fork 0

Rollup merge of #80072 - richkadel:llvm-coverage-counters-2.2.1, r=tmandry

Fixed conflict with drop elaboration and coverage

See
https://github.com/rust-lang/rust/issues/80045#issuecomment-745733339

Coverage statements are moved to the beginning of the BCB. This does
also affect what's counted before a panic, changing some results, but I
think these results may even be preferred? In any case, there are no
guarantees about what's counted when a panic occurs (by design).

r? `@tmandry`

FYI `@wesleywiser` `@ecstatic-morse`
This commit is contained in:
Yuki Okushi 2020-12-17 11:44:06 +09:00 committed by GitHub
commit a5b1d2252f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 76 additions and 76 deletions

View file

@ -310,7 +310,7 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
inject_statement(
self.mir_body,
counter_kind,
self.bcb_last_bb(bcb),
self.bcb_leader_bb(bcb),
Some(make_code_region(file_name, &self.source_file, span, body_span)),
);
}
@ -470,7 +470,7 @@ fn inject_statement(
code_region: some_code_region,
}),
};
data.statements.push(statement);
data.statements.insert(0, statement);
}
// Non-code expressions are injected into the coverage map, without generating executable code.