From 27d509d70e6ca1f47cd392680df97da6017783d1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 27 Apr 2022 15:28:58 +0800 Subject: [PATCH] nac3artiq: get_const_obj should no longer make a pointer. Closes #272 --- nac3artiq/src/symbol_resolver.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nac3artiq/src/symbol_resolver.rs b/nac3artiq/src/symbol_resolver.rs index b4f1cc3c..5378c8b9 100644 --- a/nac3artiq/src/symbol_resolver.rs +++ b/nac3artiq/src/symbol_resolver.rs @@ -115,13 +115,7 @@ impl StaticValue for PythonValue { &[ctx.ctx.i32_type().const_int(id as u64, false).into()], false, )); - let global2 = ctx.module.add_global( - struct_type.ptr_type(AddressSpace::Generic), - None, - format!("{}_const2", self.id).as_str(), - ); - global2.set_initializer(&global.as_pointer_value()); - Ok(global2.as_pointer_value().into()) + Ok(global.as_pointer_value().into()) }) .unwrap() })