@@ -244,8 +244,9 @@ def _emit_method_array(self, llvm_module):
244244 sentinel = lc .Constant .struct ([NULL , NULL , ZERO , NULL ])
245245 method_defs .append (sentinel )
246246 method_array_init = lc .Constant .array (self .method_def_ty , method_defs )
247- method_array = llvm_module .add_global_variable (method_array_init .type ,
248- '.module_methods' )
247+ method_array = cgutils .add_global_variable (llvm_module ,
248+ method_array_init .type ,
249+ '.module_methods' )
249250 method_array .initializer = method_array_init
250251 method_array .linkage = lc .LINKAGE_INTERNAL
251252 method_array_ptr = lc .Constant .gep (method_array , [ZERO , ZERO ])
@@ -405,8 +406,9 @@ def _emit_python_wrapper(self, llvm_module):
405406 lc .Constant .null (lt ._pyobject_head_p ), # m_copy
406407 )
407408 )
408- mod_def_base = llvm_module .add_global_variable (mod_def_base_init .type ,
409- '.module_def_base' )
409+ mod_def_base = cgutils .add_global_variable (llvm_module ,
410+ mod_def_base_init .type ,
411+ '.module_def_base' )
410412 mod_def_base .initializer = mod_def_base_init
411413 mod_def_base .linkage = lc .LINKAGE_INTERNAL
412414
@@ -426,8 +428,8 @@ def _emit_python_wrapper(self, llvm_module):
426428 )
427429
428430 # Define a constant string for the module name.
429- mod_def = llvm_module .add_global_variable (mod_def_init .type ,
430- '.module_def' )
431+ mod_def = cgutils .add_global_variable (llvm_module , mod_def_init .type ,
432+ '.module_def' )
431433 mod_def .initializer = mod_def_init
432434 mod_def .linkage = lc .LINKAGE_INTERNAL
433435
0 commit comments