| ... | @@ -5178,11 +5178,7 @@ static LLVMValueRef ir_render_ref(CodeGen *g, IrExecutableGen *executable, IrIns | ... | @@ -5178,11 +5178,7 @@ static LLVMValueRef ir_render_ref(CodeGen *g, IrExecutableGen *executable, IrIns |
| 5178 | | 5178 | |
| 5179 | static LLVMValueRef ir_render_err_name(CodeGen *g, IrExecutableGen *executable, IrInstGenErrName *instruction) { | 5179 | static LLVMValueRef ir_render_err_name(CodeGen *g, IrExecutableGen *executable, IrInstGenErrName *instruction) { |
| 5180 | assert(g->generate_error_name_table); | 5180 | assert(g->generate_error_name_table); |
| 5181 | | 5181 | assert(g->errors_by_index.length > 0); |
| 5182 | if (g->errors_by_index.length == 1) { | | |
| 5183 | LLVMBuildUnreachable(g->builder); | | |
| 5184 | return nullptr; | | |
| 5185 | } | | |
| 5186 | | 5182 | |
| 5187 | LLVMValueRef err_val = ir_llvm_value(g, instruction->value); | 5183 | LLVMValueRef err_val = ir_llvm_value(g, instruction->value); |
| 5188 | if (ir_want_runtime_safety(g, &instruction->base)) { | 5184 | if (ir_want_runtime_safety(g, &instruction->base)) { |
| ... | @@ -7890,7 +7886,7 @@ static void render_const_val_global(CodeGen *g, ZigValue *const_val, const char | ... | @@ -7890,7 +7886,7 @@ static void render_const_val_global(CodeGen *g, ZigValue *const_val, const char |
| 7890 | } | 7886 | } |
| 7891 | | 7887 | |
| 7892 | static void generate_error_name_table(CodeGen *g) { | 7888 | static void generate_error_name_table(CodeGen *g) { |
| 7893 | if (g->err_name_table != nullptr || !g->generate_error_name_table || g->errors_by_index.length == 1) { | 7889 | if (g->err_name_table != nullptr || !g->generate_error_name_table) { |
| 7894 | return; | 7890 | return; |
| 7895 | } | 7891 | } |
| 7896 | | 7892 | |