manual c function interop
This commit is contained in:
@@ -343,11 +343,13 @@ lower :: proc(hir_module: ^hir.Module, allocator := context.allocator) -> ir.Mod
|
||||
}
|
||||
append(&module.functions, ir.Function{
|
||||
link_name=fmt.aprintf("%s", function.link_name, allocator=allocator),
|
||||
c_abi=function.c_abi,
|
||||
calling_convention=.C if function.calling_convention == .C else .Brolang,
|
||||
implementation=.Declaration if function.implementation == .Declaration else .Definition,
|
||||
linkage=.External if function.linkage == .External else .Internal,
|
||||
is_main=function.is_main,
|
||||
param_types=param_types,
|
||||
result=function.result,
|
||||
instructions=lower_body(hir_module, function, allocator),
|
||||
instructions=nil if function.implementation == .Declaration else lower_body(hir_module, function, allocator),
|
||||
problematic=function.problematic,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user