From 63011b6d24db88f3fdf5449759a7b61564619ed2 Mon Sep 17 00:00:00 2001 From: Cyrill Leutwiler Date: Wed, 2 Jul 2025 21:22:02 +0200 Subject: [PATCH] type fix Signed-off-by: Cyrill Leutwiler --- crates/llvm-context/src/polkavm/context/function/mod.rs | 2 +- crates/yul/src/parser/statement/variable_declaration.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/llvm-context/src/polkavm/context/function/mod.rs b/crates/llvm-context/src/polkavm/context/function/mod.rs index 3fc16e8..fec49e0 100644 --- a/crates/llvm-context/src/polkavm/context/function/mod.rs +++ b/crates/llvm-context/src/polkavm/context/function/mod.rs @@ -310,7 +310,7 @@ impl<'ctx> Function<'ctx> { Default::default(), unsafe { context.builder().build_gep( - context.word_type(), + context.word_type().array_type(0), self.stack_variables().as_pointer_value(), &[ context.xlen_type().const_zero(), diff --git a/crates/yul/src/parser/statement/variable_declaration.rs b/crates/yul/src/parser/statement/variable_declaration.rs index 013d1fe..c982f34 100644 --- a/crates/yul/src/parser/statement/variable_declaration.rs +++ b/crates/yul/src/parser/statement/variable_declaration.rs @@ -99,17 +99,16 @@ where mut self, context: &mut revive_llvm_context::PolkaVMContext<'ctx, D>, ) -> anyhow::Result<()> { - let pointers: Vec> = self + let _pointers: Vec> = self .bindings - .into_iter() + .iter() .map(|binding| { context .current_function() .borrow_mut() - .stack_variable_pointer(binding.inner, context) + .stack_variable_pointer(binding.inner.to_string(), context) }) .collect(); - /* if self.bindings.len() == 1 { let identifier = self.bindings.remove(0); context.set_debug_location(self.location.line, 0, None)?; @@ -224,7 +223,6 @@ where })?; context.build_store(pointer, value)?; } - */ Ok(()) }