mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Fix foreign export #294
This commit is contained in:
@@ -836,8 +836,14 @@ diverging_procedures :: proc() {
|
|||||||
foo();
|
foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreign export {
|
||||||
|
bar :: proc "c" () -> i32 {
|
||||||
|
return 123;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
when true {
|
when false {
|
||||||
general_stuff();
|
general_stuff();
|
||||||
union_type();
|
union_type();
|
||||||
parametric_polymorphism();
|
parametric_polymorphism();
|
||||||
|
|||||||
@@ -9744,6 +9744,7 @@ void ir_gen_tree(irGen *s) {
|
|||||||
irValue *p = ir_value_procedure(m, e, e->type, type_expr, body, name);
|
irValue *p = ir_value_procedure(m, e, e->type, type_expr, body, name);
|
||||||
p->Proc.tags = pl->tags;
|
p->Proc.tags = pl->tags;
|
||||||
p->Proc.inlining = pl->inlining;
|
p->Proc.inlining = pl->inlining;
|
||||||
|
p->Proc.is_export = e->Procedure.is_export;
|
||||||
|
|
||||||
ir_module_add_value(m, e, p);
|
ir_module_add_value(m, e, p);
|
||||||
HashKey hash_name = hash_string(name);
|
HashKey hash_name = hash_string(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user