diff --git a/src/context.rs b/src/context.rs index d37fa7833fc..890b4b15fc0 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) };