'Get a global value through its C-accessible *name*, with the given
LLVM type.
If *dllimport* is true, the symbol will be marked as imported
from a DLL (necessary for AOT compilation under Windows).'

def get_c_value(self, builder, typ, name, dllimport=False):

    module = builder.function.module
    try:
        gv = module.get_global_variable_named(name)
    except LLVMException:
        gv = module.add_global_variable(typ, name)
        if (dllimport and self.aot_mode and (sys.platform == 'win32')):
            gv.storage_class = 'dllimport'
    return gv
