diff --git a/src/context.rs b/src/context.rs index 1b9cfd3652c..d04c7532b3c 100644 --- a/src/context.rs +++ b/src/context.rs @@ -432,6 +432,8 @@ fn get_fn_addr(&self, instance: Instance<'tcx>) -> RValue<'gcc> { let func = if self.intrinsics.borrow().contains_key(func_name) { self.intrinsics.borrow()[func_name] + } else if let Some(variable) = self.get_declared_value(func_name) { + return variable; } else { get_fn(self, instance) };