From 1eacaf9afa7061132d9f45f74e525b3579638a59 Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 15 Feb 2024 15:08:10 +0800 Subject: [PATCH] core: Fix IRRT argument order to ndarray_flatten_index --- nac3core/src/codegen/irrt/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nac3core/src/codegen/irrt/mod.rs b/nac3core/src/codegen/irrt/mod.rs index 5702ba93..20ec0272 100644 --- a/nac3core/src/codegen/irrt/mod.rs +++ b/nac3core/src/codegen/irrt/mod.rs @@ -732,10 +732,10 @@ pub fn call_ndarray_flatten_index<'ctx>( let ndarray_flatten_index_fn = ctx.module.get_function(ndarray_flatten_index_fn_name).unwrap_or_else(|| { let fn_type = llvm_usize.fn_type( &[ + llvm_pusize.into(), llvm_usize.into(), - llvm_pusize.into(), llvm_pi32.into(), - llvm_pusize.into(), + llvm_usize.into(), ], false, ); @@ -752,10 +752,10 @@ pub fn call_ndarray_flatten_index<'ctx>( .build_call( ndarray_flatten_index_fn, &[ - ndarray_num_dims.into(), ndarray_dims.get_ptr(ctx).into(), + ndarray_num_dims.into(), + indices.into(), indices_size.into(), - indices_data.get_ptr(ctx).into(), ], "", )