mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-12 14:21:25 -07:00
Remove many LLVM optimization passes which were causes UB due to them assuming C-like behaviour incompatible with Odin
This commit is contained in:
@@ -684,7 +684,8 @@ lbProcedure *lb_create_startup_runtime(lbModule *main_module, lbProcedure *start
|
||||
if (init.value == nullptr) {
|
||||
LLVMTypeRef global_type = LLVMGetElementType(LLVMTypeOf(var->var.value));
|
||||
if (is_type_untyped_undef(init.type)) {
|
||||
LLVMSetInitializer(var->var.value, LLVMGetUndef(global_type));
|
||||
// LLVMSetInitializer(var->var.value, LLVMGetUndef(global_type));
|
||||
LLVMSetInitializer(var->var.value, LLVMConstNull(global_type));
|
||||
var->is_initialized = true;
|
||||
continue;
|
||||
} else if (is_type_untyped_nil(init.type)) {
|
||||
|
||||
Reference in New Issue
Block a user