Change to assert to test both LLVMIsConstant and LLVMIsGlobalConstant

This commit is contained in:
gingerBill
2021-03-25 22:14:38 +00:00
parent 615104afd1
commit 23c68b4f7a
+1 -1
View File
@@ -6064,7 +6064,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
}
for (isize i = 0; i < value_count; i++) {
GB_ASSERT(LLVMIsConstant(values[i]));
GB_ASSERT(LLVMIsConstant(values[i]) || LLVMIsGlobalConstant(values[i]));
}
res.value = llvm_const_named_struct(lb_type(m, original_type), values, cast(unsigned)value_count);