Rollup merge of #66991 - Nashenas88:body_cache_cleanup, r=eddyb
Cleanup BodyCache After this PR: - `BodyCache` is renamed to `BodyAndCache` - `ReadOnlyBodyCache` is renamed to `ReadOnlyBodyAndCache` - `ReadOnlyBodyAndCache::body` fn is removed and all calls to it are replaced by a deref (possible due to fix of its `Deref` imp in #65947) cc @eddyb @oli-obk
This commit is contained in:
commit
56c0bea390
58 changed files with 226 additions and 224 deletions
|
|
@ -153,7 +153,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
|
|||
// a loop.
|
||||
fn maybe_sideeffect<Bx: BuilderMethods<'a, 'tcx>>(
|
||||
&self,
|
||||
mir: mir::ReadOnlyBodyCache<'tcx, 'tcx>,
|
||||
mir: mir::ReadOnlyBodyAndCache<'tcx, 'tcx>,
|
||||
bx: &mut Bx,
|
||||
targets: &[mir::BasicBlock],
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use self::operand::{OperandRef, OperandValue};
|
|||
pub struct FunctionCx<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
|
||||
instance: Instance<'tcx>,
|
||||
|
||||
mir: mir::ReadOnlyBodyCache<'tcx, 'tcx>,
|
||||
mir: mir::ReadOnlyBodyAndCache<'tcx, 'tcx>,
|
||||
|
||||
debug_context: Option<FunctionDebugContext<Bx::DIScope>>,
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
}).collect();
|
||||
|
||||
let (landing_pads, funclets) = create_funclets(&mir, &mut bx, &cleanup_kinds, &block_bxs);
|
||||
let mir_body: &mir::Body<'_> = mir.body();
|
||||
let mir_body: &mir::Body<'_> = *mir;
|
||||
let mut fx = FunctionCx {
|
||||
instance,
|
||||
mir,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue