def global_constant(builder_or_module, name, value, linkage='internal'):
 if isinstance(builder_or_module, ir.Module):
  module = builder_or_module
 else:
  module = builder_or_module.module
 data = module.add_global_variable(value.type, name=name)
 data.linkage = linkage
 data.global_constant = True
 data.initializer = value
 return data

def global_constant ( builder_or_module , name , value , linkage = 'internal' ) : if isinstance ( builder_or_module , ir . Module ) : module = builder_or_module else : module = builder_or_module . module data = module . add_global_variable ( value . type , name = name ) data . linkage = linkage data . global_constant = True data . initializer = value return data
get or create a global constant with *name* or *value* .