|
@@ -962,8 +962,12 @@ gb_internal bool lb_is_type_proc_recursive(Type *t) {
|
|
|
|
|
|
gb_internal void lb_emit_store(lbProcedure *p, lbValue ptr, lbValue value) {
|
|
|
GB_ASSERT(value.value != nullptr);
|
|
|
- Type *a = type_deref(ptr.type);
|
|
|
|
|
|
+ if (LLVMIsUndef(value.value)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Type *a = type_deref(ptr.type);
|
|
|
if (LLVMIsNull(value.value)) {
|
|
|
LLVMTypeRef src_t = llvm_addr_type(p->module, ptr);
|
|
|
if (is_type_proc(a)) {
|