From bedbc3ca478fdaf3617092c23db01a3e836ca68b Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sat, 11 May 2024 16:38:56 -0400 Subject: [PATCH] Clone all MIR bodies --- compiler/rustc_codegen_ssa/src/mir/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs index cf6e2e8d14c6c..37ee2272213d8 100644 --- a/compiler/rustc_codegen_ssa/src/mir/mod.rs +++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs @@ -166,6 +166,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( let llfn = cx.get_fn(instance); let mir = cx.tcx().instance_mir(instance.def); + drop(std::hint::black_box(mir.clone())); let fn_abi = cx.fn_abi_of_instance(instance, ty::List::empty()); debug!("fn_abi: {:?}", fn_abi);