| ... | ... | @@ -9164,7 +9164,10 @@ bool ir_gen(CodeGen *codegen, AstNode *node, Scope *scope, IrExecutable *ir_exec |
| 9164 | 9164 | ir_ref_bb(irb->current_basic_block); |
| 9165 | 9165 | |
| 9166 | 9166 | IrInstruction *result = ir_gen_node_extra(irb, node, scope, LValNone, nullptr); |
| 9167 | | assert(result); |
| 9167 | |
| 9168 | if (result == irb->codegen->invalid_instruction) |
| 9169 | return false; |
| 9170 | |
| 9168 | 9171 | if (irb->exec->first_err_trace_msg != nullptr) { |
| 9169 | 9172 | codegen->trace_err = irb->exec->first_err_trace_msg; |
| 9170 | 9173 | return false; |
| ... | ... | @@ -12029,7 +12032,9 @@ ZigValue *ir_eval_const_value(CodeGen *codegen, Scope *scope, AstNode *node, |
| 12029 | 12032 | ir_executable->fn_entry = fn_entry; |
| 12030 | 12033 | ir_executable->c_import_buf = c_import_buf; |
| 12031 | 12034 | ir_executable->begin_scope = scope; |
| 12032 | | ir_gen(codegen, node, scope, ir_executable); |
| 12035 | |
| 12036 | if (!ir_gen(codegen, node, scope, ir_executable)) |
| 12037 | return codegen->invalid_instruction->value; |
| 12033 | 12038 | |
| 12034 | 12039 | if (ir_executable->first_err_trace_msg != nullptr) { |
| 12035 | 12040 | codegen->trace_err = ir_executable->first_err_trace_msg; |