Merge pull request #3872 from laytan/fix-assertion-failure-on-old-llvm

Fix assertion false negative
This commit is contained in:
gingerBill
2024-07-04 23:27:11 +01:00
committed by GitHub

View File

@@ -176,7 +176,6 @@ gb_internal LLVMValueRef llvm_const_named_struct_internal(LLVMTypeRef t, LLVMVal
for (unsigned i = 0; i < elem_count; i++) {
LLVMTypeRef elem_type = LLVMStructGetTypeAtIndex(t, i);
values[i] = llvm_const_cast(values[i], elem_type);
GB_ASSERT_MSG(elem_type == LLVMTypeOf(values[i]), "%s != %s", LLVMPrintTypeToString(LLVMTypeOf(values[i])), LLVMPrintTypeToString(elem_type));
}
return LLVMConstNamedStruct(t, values, value_count);
}