From 5e314b41c15d38b0efbda22a6ab4c4352b79613b Mon Sep 17 00:00:00 2001 From: Zffu <103074097+Zffu@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:55:35 +0100 Subject: [PATCH] fix: fixed IRFunction.call returning an IRPointer --- ir/src/conv/func.rs | 2 +- ir/src/irstruct/funcs.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ir/src/conv/func.rs b/ir/src/conv/func.rs index 220a5cd2..20629364 100644 --- a/ir/src/conv/func.rs +++ b/ir/src/conv/func.rs @@ -118,7 +118,7 @@ pub fn parse_ir_function_call(ctx: &IRContext, f: &IRFunction, node: Box, grab_return: bool) -> PositionlessResult> { + pub fn call(&self, ctx: &IRContext, args: Vec, grab_return: bool) -> PositionlessResult> { let mut inkwell_args = vec![]; for arg in args { @@ -94,9 +94,7 @@ impl IRFunction { let val = IRValue::new(OwnedValueEnum::new(&ctx.inkwell_ctx, val), return_type.clone()); - let pointer = IRPointer::create(ctx, format!("function_ret_{}", self.name), return_type, Some(IRValueRef::from_val(val)))?; - - return Ok(Some(pointer)); + return Ok(Some(val)); } /// Prepares the addition of the function body.