From 1bd9fe04c4baf9fba32a38b94d564f0253b320d1 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Thu, 4 Jul 2024 23:55:21 +0200 Subject: Fix assertion false positive Assertion was added in #3855 - https://github.com/odin-lang/Odin/pull/3855/commits/723314909679b89e159cb4cb05d250d12ac64436 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. --- src/llvm_backend_const.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/llvm_backend_const.cpp') diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp index 81fe624ff..9cc0552de 100644 --- a/src/llvm_backend_const.cpp +++ b/src/llvm_backend_const.cpp @@ -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); } -- cgit v1.2.3