extern variables and object-like macro consts
This commit is contained in:
@@ -644,10 +644,13 @@ lower :: proc(hir_module: ^hir.Module, allocator := context.allocator) -> ir.Mod
|
||||
_ = ir.global_id(len(module.globals))
|
||||
append(&module.globals, ir.Global{
|
||||
name=global.name,
|
||||
link_name=fmt.aprintf("%s", global.link_name, allocator=allocator),
|
||||
type=global.type,
|
||||
is_static=global.is_static,
|
||||
external=global.external,
|
||||
writable=global.writable,
|
||||
static_value=global.static_value,
|
||||
initializer=nil if global.is_static else lower_global_initializer(hir_module, global, allocator),
|
||||
initializer=nil if global.is_static || global.external else lower_global_initializer(hir_module, global, allocator),
|
||||
problematic=global.problematic,
|
||||
diagnostic=global.diagnostic,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user