Fix assertion false positive

Assertion was added in #3855 - 7233149096
to mimic LLVM's own internal assertion for this, turns out their
assertion is more sophisticated than an `==` so lets just remove it.

To be clear their internal assertion is not hit while this one is, which
defeats the purpose of ours.
This commit is contained in:
Laytan Laats
2024-07-04 23:55:21 +02:00
parent 3c2161b196
commit 1bd9fe04c4

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);
}