Browse Source

Merge branch 'master' of https://github.com/odin-lang/Odin

gingerBill 3 years ago
parent
commit
5808793cae
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/llvm_backend_general.cpp

+ 2 - 1
src/llvm_backend_general.cpp

@@ -1602,8 +1602,9 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
 						return llvm_type;
 						return llvm_type;
 					}
 					}
 					llvm_type = LLVMStructCreateNamed(ctx, name);
 					llvm_type = LLVMStructCreateNamed(ctx, name);
+					LLVMTypeRef found_val = *found;
 					map_set(&m->types, type, llvm_type);
 					map_set(&m->types, type, llvm_type);
-					lb_clone_struct_type(llvm_type, *found);
+					lb_clone_struct_type(llvm_type, found_val);
 					return llvm_type;
 					return llvm_type;
 				}
 				}
 			}
 			}