From 7b994595da74e1855a58395da4ad2f7a169c8f34 Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Sat, 22 Aug 2020 19:05:22 +0200 Subject: [PATCH] trans_fn: Cleanup code --- src/base.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base.rs b/src/base.rs index 86ba6ab114d..42068dde05d 100644 --- a/src/base.rs +++ b/src/base.rs @@ -16,10 +16,10 @@ pub(crate) fn trans_fn<'tcx, B: Backend + 'static>( let (name, sig) = get_function_name_and_sig(tcx, cx.module.isa().triple(), instance, false); let func_id = cx.module.declare_function(&name, linkage, &sig).unwrap(); - // Make the FunctionBuilder - let mut func_ctx = FunctionBuilderContext::new(); cx.cached_context.clear(); + // Make the FunctionBuilder + let mut func_ctx = FunctionBuilderContext::new(); let mut func = std::mem::replace(&mut cx.cached_context.func, Function::new()); func.name = ExternalName::user(0, func_id.as_u32()); func.signature = sig;