Browse Source

Change to assert to test both LLVMIsConstant and LLVMIsGlobalConstant

gingerBill 4 years ago
parent
commit
23c68b4f7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/llvm_backend.cpp

+ 1 - 1
src/llvm_backend.cpp

@@ -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++) {
 			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);
 			res.value = llvm_const_named_struct(lb_type(m, original_type), values, cast(unsigned)value_count);