mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix -llvm-api const initialization of &T{}
This commit is contained in:
@@ -13148,6 +13148,8 @@ void lb_generate_code(lbGenerator *gen) {
|
|||||||
lbValue init = lb_build_expr(p, var->decl->init_expr);
|
lbValue init = lb_build_expr(p, var->decl->init_expr);
|
||||||
if (!lb_is_const(init)) {
|
if (!lb_is_const(init)) {
|
||||||
var->init = init;
|
var->init = init;
|
||||||
|
} else {
|
||||||
|
LLVMSetInitializer(var->var.value, init.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user