Browse Source

Remove debug code

gingerBill 2 weeks ago
parent
commit
1f2cedcf78
1 changed files with 0 additions and 8 deletions
  1. 0 8
      src/llvm_backend_const.cpp

+ 0 - 8
src/llvm_backend_const.cpp

@@ -1503,14 +1503,6 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb
 					if (elem_type_can_be_constant(f->type)) {
 					if (elem_type_can_be_constant(f->type)) {
 						if (sel.index.count == 1) {
 						if (sel.index.count == 1) {
 							lbValue value = lb_const_value(m, f->type, tav.value, cc, tav.type);
 							lbValue value = lb_const_value(m, f->type, tav.value, cc, tav.type);
-							if (is_type_union(f->type)) {
-								if (f->token.string == "default_value") {
-									if (LLVMIsNull(value.value)) {
-										gb_printf_err("HERE: %s %s\n", type_to_string(f->type), LLVMPrintValueToString(value.value));
-										GB_PANIC("GAH");
-									}
-								}
-							}
 							LLVMTypeRef value_type = LLVMTypeOf(value.value);
 							LLVMTypeRef value_type = LLVMTypeOf(value.value);
 							GB_ASSERT_MSG(lb_sizeof(value_type) == type_size_of(f->type), "%s vs %s", LLVMPrintTypeToString(value_type), type_to_string(f->type));
 							GB_ASSERT_MSG(lb_sizeof(value_type) == type_size_of(f->type), "%s vs %s", LLVMPrintTypeToString(value_type), type_to_string(f->type));
 							values[index]  = value.value;
 							values[index]  = value.value;