From 29212ecdc9867fe90cca637374c1c73eb2e43e6b Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 4 Oct 2016 12:00:15 -0400 Subject: [PATCH] Assign internal linkage to autogenerated FnOnce::call_once() instances. --- src/librustc_trans/closure.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_trans/closure.rs b/src/librustc_trans/closure.rs index c0692e8085fc..d506b47407d7 100644 --- a/src/librustc_trans/closure.rs +++ b/src/librustc_trans/closure.rs @@ -257,7 +257,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>( // Create the by-value helper. let function_name = method_instance.symbol_name(ccx.shared()); - let lloncefn = declare::declare_fn(ccx, &function_name, llonce_fn_ty); + let lloncefn = declare::define_internal_fn(ccx, &function_name, llonce_fn_ty); attributes::set_frame_pointer_elimination(ccx, lloncefn); let (block_arena, fcx): (TypedArena<_>, FunctionContext);