mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +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);
|
||||
if (!lb_is_const(init)) {
|
||||
var->init = init;
|
||||
} else {
|
||||
LLVMSetInitializer(var->var.value, init.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user