| ... | ... | @@ -161,7 +161,8 @@ static IrInstruction *ir_gen_node(IrBuilder *irb, AstNode *node, Scope *scope); |
| 161 | 161 | static IrInstruction *ir_gen_node_extra(IrBuilder *irb, AstNode *node, Scope *scope, LVal lval, |
| 162 | 162 | ResultLoc *result_loc); |
| 163 | 163 | static IrInstruction *ir_implicit_cast(IrAnalyze *ira, IrInstruction *value, ZigType *expected_type); |
| 164 | | static IrInstruction *ir_get_deref(IrAnalyze *ira, IrInstruction *source_instruction, IrInstruction *ptr); |
| 164 | static IrInstruction *ir_get_deref(IrAnalyze *ira, IrInstruction *source_instruction, IrInstruction *ptr, |
| 165 | ResultLoc *result_loc); |
| 165 | 166 | static ErrorMsg *exec_add_error_node(CodeGen *codegen, IrExecutable *exec, AstNode *source_node, Buf *msg); |
| 166 | 167 | static IrInstruction *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field_name, |
| 167 | 168 | IrInstruction *source_instr, IrInstruction *container_ptr, ZigType *container_type, bool initializing); |
| ... | ... | @@ -1467,12 +1468,13 @@ static IrInstruction *ir_build_ptr_type(IrBuilder *irb, Scope *scope, AstNode *s |
| 1467 | 1468 | } |
| 1468 | 1469 | |
| 1469 | 1470 | static IrInstruction *ir_build_un_op_lval(IrBuilder *irb, Scope *scope, AstNode *source_node, IrUnOp op_id, |
| 1470 | | IrInstruction *value, LVal lval) |
| 1471 | IrInstruction *value, LVal lval, ResultLoc *result_loc) |
| 1471 | 1472 | { |
| 1472 | 1473 | IrInstructionUnOp *instruction = ir_build_instruction<IrInstructionUnOp>(irb, scope, source_node); |
| 1473 | 1474 | instruction->op_id = op_id; |
| 1474 | 1475 | instruction->value = value; |
| 1475 | 1476 | instruction->lval = lval; |
| 1477 | instruction->result_loc = result_loc; |
| 1476 | 1478 | |
| 1477 | 1479 | ir_ref_instruction(value, irb->current_basic_block); |
| 1478 | 1480 | |
| ... | ... | @@ -1482,7 +1484,7 @@ static IrInstruction *ir_build_un_op_lval(IrBuilder *irb, Scope *scope, AstNode |
| 1482 | 1484 | static IrInstruction *ir_build_un_op(IrBuilder *irb, Scope *scope, AstNode *source_node, IrUnOp op_id, |
| 1483 | 1485 | IrInstruction *value) |
| 1484 | 1486 | { |
| 1485 | | return ir_build_un_op_lval(irb, scope, source_node, op_id, value, LValNone); |
| 1487 | return ir_build_un_op_lval(irb, scope, source_node, op_id, value, LValNone, nullptr); |
| 1486 | 1488 | } |
| 1487 | 1489 | |
| 1488 | 1490 | static IrInstruction *ir_build_container_init_list(IrBuilder *irb, Scope *scope, AstNode *source_node, |
| ... | ... | @@ -2471,14 +2473,16 @@ static IrInstruction *ir_build_ptr_cast_gen(IrAnalyze *ira, IrInstruction *sourc |
| 2471 | 2473 | } |
| 2472 | 2474 | |
| 2473 | 2475 | static IrInstruction *ir_build_load_ptr_gen(IrAnalyze *ira, IrInstruction *source_instruction, |
| 2474 | | IrInstruction *ptr, ZigType *ty) |
| 2476 | IrInstruction *ptr, ZigType *ty, IrInstruction *result_loc) |
| 2475 | 2477 | { |
| 2476 | 2478 | IrInstructionLoadPtrGen *instruction = ir_build_instruction<IrInstructionLoadPtrGen>( |
| 2477 | 2479 | &ira->new_irb, source_instruction->scope, source_instruction->source_node); |
| 2478 | 2480 | instruction->base.value.type = ty; |
| 2479 | 2481 | instruction->ptr = ptr; |
| 2482 | instruction->result_loc = result_loc; |
| 2480 | 2483 | |
| 2481 | 2484 | ir_ref_instruction(ptr, ira->new_irb.current_basic_block); |
| 2485 | if (result_loc != nullptr) ir_ref_instruction(result_loc, ira->new_irb.current_basic_block); |
| 2482 | 2486 | |
| 2483 | 2487 | return &instruction->base; |
| 2484 | 2488 | } |
| ... | ... | @@ -8028,7 +8032,8 @@ static IrInstruction *ir_gen_node_raw(IrBuilder *irb, AstNode *node, Scope *scop |
| 8028 | 8032 | // We essentially just converted any lvalue from &(x.*) to (&x).*; |
| 8029 | 8033 | // this inhibits checking that x is a pointer later, so we directly |
| 8030 | 8034 | // record whether the pointer check is needed |
| 8031 | | return ir_build_un_op_lval(irb, scope, node, IrUnOpDereference, value, lval); |
| 8035 | IrInstruction *un_op = ir_build_un_op_lval(irb, scope, node, IrUnOpDereference, value, lval, result_loc); |
| 8036 | return ir_expr_wrap(irb, scope, un_op, result_loc); |
| 8032 | 8037 | } |
| 8033 | 8038 | case NodeTypeUnwrapOptional: { |
| 8034 | 8039 | AstNode *expr_node = node->data.unwrap_optional.expr; |
| ... | ... | @@ -11312,7 +11317,7 @@ static IrInstruction *ir_analyze_array_to_slice(IrAnalyze *ira, IrInstruction *s |
| 11312 | 11317 | IrInstruction *array_ptr = nullptr; |
| 11313 | 11318 | IrInstruction *array; |
| 11314 | 11319 | if (array_arg->value.type->id == ZigTypeIdPointer) { |
| 11315 | | array = ir_get_deref(ira, source_instr, array_arg); |
| 11320 | array = ir_get_deref(ira, source_instr, array_arg, nullptr); |
| 11316 | 11321 | array_ptr = array_arg; |
| 11317 | 11322 | } else { |
| 11318 | 11323 | array = array_arg; |
| ... | ... | @@ -12512,60 +12517,71 @@ static IrInstruction *ir_implicit_cast(IrAnalyze *ira, IrInstruction *value, Zig |
| 12512 | 12517 | return ir_implicit_cast_with_result(ira, value, expected_type, nullptr); |
| 12513 | 12518 | } |
| 12514 | 12519 | |
| 12515 | | static IrInstruction *ir_get_deref(IrAnalyze *ira, IrInstruction *source_instruction, IrInstruction *ptr) { |
| 12520 | static IrInstruction *ir_get_deref(IrAnalyze *ira, IrInstruction *source_instruction, IrInstruction *ptr, |
| 12521 | ResultLoc *result_loc) |
| 12522 | { |
| 12516 | 12523 | Error err; |
| 12517 | 12524 | ZigType *type_entry = ptr->value.type; |
| 12518 | | if (type_is_invalid(type_entry)) { |
| 12525 | if (type_is_invalid(type_entry)) |
| 12519 | 12526 | return ira->codegen->invalid_instruction; |
| 12520 | | } else if (type_entry->id == ZigTypeIdPointer) { |
| 12521 | | ZigType *child_type = type_entry->data.pointer.child_type; |
| 12522 | | // if the child type has one possible value, the deref is comptime |
| 12523 | | switch (type_has_one_possible_value(ira->codegen, child_type)) { |
| 12524 | | case OnePossibleValueInvalid: |
| 12525 | | return ira->codegen->invalid_instruction; |
| 12526 | | case OnePossibleValueYes: |
| 12527 | | return ir_const(ira, source_instruction, child_type); |
| 12528 | | case OnePossibleValueNo: |
| 12529 | | break; |
| 12527 | |
| 12528 | if (type_entry->id != ZigTypeIdPointer) { |
| 12529 | ir_add_error_node(ira, source_instruction->source_node, |
| 12530 | buf_sprintf("attempt to dereference non-pointer type '%s'", |
| 12531 | buf_ptr(&type_entry->name))); |
| 12532 | return ira->codegen->invalid_instruction; |
| 12533 | } |
| 12534 | |
| 12535 | ZigType *child_type = type_entry->data.pointer.child_type; |
| 12536 | // if the child type has one possible value, the deref is comptime |
| 12537 | switch (type_has_one_possible_value(ira->codegen, child_type)) { |
| 12538 | case OnePossibleValueInvalid: |
| 12539 | return ira->codegen->invalid_instruction; |
| 12540 | case OnePossibleValueYes: |
| 12541 | return ir_const(ira, source_instruction, child_type); |
| 12542 | case OnePossibleValueNo: |
| 12543 | break; |
| 12544 | } |
| 12545 | if (instr_is_comptime(ptr)) { |
| 12546 | if (ptr->value.special == ConstValSpecialUndef) { |
| 12547 | ir_add_error(ira, ptr, buf_sprintf("attempt to dereference undefined value")); |
| 12548 | return ira->codegen->invalid_instruction; |
| 12530 | 12549 | } |
| 12531 | | if (instr_is_comptime(ptr)) { |
| 12532 | | if (ptr->value.special == ConstValSpecialUndef) { |
| 12533 | | ir_add_error(ira, ptr, buf_sprintf("attempt to dereference undefined value")); |
| 12534 | | return ira->codegen->invalid_instruction; |
| 12535 | | } |
| 12536 | | if (ptr->value.data.x_ptr.mut == ConstPtrMutComptimeConst || |
| 12537 | | ptr->value.data.x_ptr.mut == ConstPtrMutComptimeVar) |
| 12538 | | { |
| 12539 | | ConstExprValue *pointee = const_ptr_pointee_unchecked(ira->codegen, &ptr->value); |
| 12540 | | if (pointee->special != ConstValSpecialRuntime) { |
| 12541 | | IrInstruction *result = ir_const(ira, source_instruction, child_type); |
| 12550 | if (ptr->value.data.x_ptr.mut == ConstPtrMutComptimeConst || |
| 12551 | ptr->value.data.x_ptr.mut == ConstPtrMutComptimeVar) |
| 12552 | { |
| 12553 | ConstExprValue *pointee = const_ptr_pointee_unchecked(ira->codegen, &ptr->value); |
| 12554 | if (pointee->special != ConstValSpecialRuntime) { |
| 12555 | IrInstruction *result = ir_const(ira, source_instruction, child_type); |
| 12542 | 12556 | |
| 12543 | | if ((err = ir_read_const_ptr(ira, ira->codegen, source_instruction->source_node, &result->value, |
| 12544 | | &ptr->value))) |
| 12545 | | { |
| 12546 | | return ira->codegen->invalid_instruction; |
| 12547 | | } |
| 12548 | | result->value.type = child_type; |
| 12549 | | return result; |
| 12557 | if ((err = ir_read_const_ptr(ira, ira->codegen, source_instruction->source_node, &result->value, |
| 12558 | &ptr->value))) |
| 12559 | { |
| 12560 | return ira->codegen->invalid_instruction; |
| 12550 | 12561 | } |
| 12562 | result->value.type = child_type; |
| 12563 | return result; |
| 12551 | 12564 | } |
| 12552 | 12565 | } |
| 12553 | | // if the instruction is a const ref instruction we can skip it |
| 12554 | | if (ptr->id == IrInstructionIdRef) { |
| 12555 | | IrInstructionRef *ref_inst = reinterpret_cast<IrInstructionRef *>(ptr); |
| 12556 | | return ref_inst->value; |
| 12557 | | } |
| 12558 | | IrInstruction *result = ir_build_load_ptr_gen(ira, source_instruction, ptr, child_type); |
| 12559 | | if (type_entry->data.pointer.host_int_bytes != 0 && handle_is_ptr(child_type)) { |
| 12560 | | ir_add_alloca(ira, result, child_type); |
| 12566 | } |
| 12567 | // if the instruction is a const ref instruction we can skip it |
| 12568 | if (ptr->id == IrInstructionIdRef) { |
| 12569 | IrInstructionRef *ref_inst = reinterpret_cast<IrInstructionRef *>(ptr); |
| 12570 | return ref_inst->value; |
| 12571 | } |
| 12572 | |
| 12573 | IrInstruction *result_loc_inst; |
| 12574 | if (type_entry->data.pointer.host_int_bytes != 0 && handle_is_ptr(child_type)) { |
| 12575 | if (result_loc == nullptr) result_loc = no_result_loc(); |
| 12576 | result_loc_inst = ir_resolve_result(ira, source_instruction, result_loc, child_type, nullptr); |
| 12577 | if (type_is_invalid(result_loc_inst->value.type) || instr_is_unreachable(result_loc_inst)) { |
| 12578 | return result_loc_inst; |
| 12561 | 12579 | } |
| 12562 | | return result; |
| 12563 | 12580 | } else { |
| 12564 | | ir_add_error_node(ira, source_instruction->source_node, |
| 12565 | | buf_sprintf("attempt to dereference non-pointer type '%s'", |
| 12566 | | buf_ptr(&type_entry->name))); |
| 12567 | | return ira->codegen->invalid_instruction; |
| 12581 | result_loc_inst = nullptr; |
| 12568 | 12582 | } |
| 12583 | |
| 12584 | return ir_build_load_ptr_gen(ira, source_instruction, ptr, child_type, result_loc_inst); |
| 12569 | 12585 | } |
| 12570 | 12586 | |
| 12571 | 12587 | static bool ir_resolve_align(IrAnalyze *ira, IrInstruction *value, uint32_t *out) { |
| ... | ... | @@ -14585,7 +14601,7 @@ IrInstruction *ir_get_implicit_allocator(IrAnalyze *ira, IrInstruction *source_i |
| 14585 | 14601 | ZigVar *coro_allocator_var = ira->old_irb.exec->coro_allocator_var; |
| 14586 | 14602 | assert(coro_allocator_var != nullptr); |
| 14587 | 14603 | IrInstruction *var_ptr_inst = ir_get_var_ptr(ira, source_instr, coro_allocator_var); |
| 14588 | | IrInstruction *result = ir_get_deref(ira, source_instr, var_ptr_inst); |
| 14604 | IrInstruction *result = ir_get_deref(ira, source_instr, var_ptr_inst, nullptr); |
| 14589 | 14605 | assert(result->value.type != nullptr); |
| 14590 | 14606 | return result; |
| 14591 | 14607 | } |
| ... | ... | @@ -15313,7 +15329,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 15313 | 15329 | if (!first_arg_known_bare && handle_is_ptr(first_arg_ptr->value.type->data.pointer.child_type)) { |
| 15314 | 15330 | first_arg = first_arg_ptr; |
| 15315 | 15331 | } else { |
| 15316 | | first_arg = ir_get_deref(ira, first_arg_ptr, first_arg_ptr); |
| 15332 | first_arg = ir_get_deref(ira, first_arg_ptr, first_arg_ptr, nullptr); |
| 15317 | 15333 | if (type_is_invalid(first_arg->value.type)) |
| 15318 | 15334 | return ira->codegen->invalid_instruction; |
| 15319 | 15335 | } |
| ... | ... | @@ -15472,7 +15488,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 15472 | 15488 | if (!first_arg_known_bare && handle_is_ptr(first_arg_ptr->value.type->data.pointer.child_type)) { |
| 15473 | 15489 | first_arg = first_arg_ptr; |
| 15474 | 15490 | } else { |
| 15475 | | first_arg = ir_get_deref(ira, first_arg_ptr, first_arg_ptr); |
| 15491 | first_arg = ir_get_deref(ira, first_arg_ptr, first_arg_ptr, nullptr); |
| 15476 | 15492 | if (type_is_invalid(first_arg->value.type)) |
| 15477 | 15493 | return ira->codegen->invalid_instruction; |
| 15478 | 15494 | } |
| ... | ... | @@ -15516,7 +15532,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 15516 | 15532 | if (type_is_invalid(arg_var_ptr_inst->value.type)) |
| 15517 | 15533 | return ira->codegen->invalid_instruction; |
| 15518 | 15534 | |
| 15519 | | IrInstruction *arg_tuple_arg = ir_get_deref(ira, arg, arg_var_ptr_inst); |
| 15535 | IrInstruction *arg_tuple_arg = ir_get_deref(ira, arg, arg_var_ptr_inst, nullptr); |
| 15520 | 15536 | if (type_is_invalid(arg_tuple_arg->value.type)) |
| 15521 | 15537 | return ira->codegen->invalid_instruction; |
| 15522 | 15538 | |
| ... | ... | @@ -15702,7 +15718,7 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c |
| 15702 | 15718 | { |
| 15703 | 15719 | first_arg = first_arg_ptr; |
| 15704 | 15720 | } else { |
| 15705 | | first_arg = ir_get_deref(ira, first_arg_ptr, first_arg_ptr); |
| 15721 | first_arg = ir_get_deref(ira, first_arg_ptr, first_arg_ptr, nullptr); |
| 15706 | 15722 | if (type_is_invalid(first_arg->value.type)) |
| 15707 | 15723 | return ira->codegen->invalid_instruction; |
| 15708 | 15724 | } |
| ... | ... | @@ -16113,7 +16129,7 @@ static IrInstruction *ir_analyze_instruction_un_op(IrAnalyze *ira, IrInstruction |
| 16113 | 16129 | return ira->codegen->invalid_instruction; |
| 16114 | 16130 | } |
| 16115 | 16131 | |
| 16116 | | IrInstruction *result = ir_get_deref(ira, &instruction->base, ptr); |
| 16132 | IrInstruction *result = ir_get_deref(ira, &instruction->base, ptr, instruction->result_loc); |
| 16117 | 16133 | if (result == ira->codegen->invalid_instruction) |
| 16118 | 16134 | return ira->codegen->invalid_instruction; |
| 16119 | 16135 | |
| ... | ... | @@ -16994,7 +17010,7 @@ static IrInstruction *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstruc |
| 16994 | 17010 | assert(container_ptr->value.type->id == ZigTypeIdPointer); |
| 16995 | 17011 | if (container_type->id == ZigTypeIdPointer) { |
| 16996 | 17012 | ZigType *bare_type = container_ref_type(container_type); |
| 16997 | | IrInstruction *container_child = ir_get_deref(ira, &field_ptr_instruction->base, container_ptr); |
| 17013 | IrInstruction *container_child = ir_get_deref(ira, &field_ptr_instruction->base, container_ptr, nullptr); |
| 16998 | 17014 | IrInstruction *result = ir_analyze_container_field_ptr(ira, field_name, &field_ptr_instruction->base, container_child, bare_type, field_ptr_instruction->initializing); |
| 16999 | 17015 | return result; |
| 17000 | 17016 | } else { |
| ... | ... | @@ -17339,7 +17355,7 @@ static IrInstruction *ir_analyze_instruction_load_ptr(IrAnalyze *ira, IrInstruct |
| 17339 | 17355 | IrInstruction *ptr = instruction->ptr->child; |
| 17340 | 17356 | if (type_is_invalid(ptr->value.type)) |
| 17341 | 17357 | return ira->codegen->invalid_instruction; |
| 17342 | | return ir_get_deref(ira, &instruction->base, ptr); |
| 17358 | return ir_get_deref(ira, &instruction->base, ptr, nullptr); |
| 17343 | 17359 | } |
| 17344 | 17360 | |
| 17345 | 17361 | static IrInstruction *ir_analyze_instruction_typeof(IrAnalyze *ira, IrInstructionTypeOf *typeof_instruction) { |
| ... | ... | @@ -17807,7 +17823,7 @@ static IrInstruction *ir_analyze_unwrap_optional_payload(IrAnalyze *ira, IrInstr |
| 17807 | 17823 | } |
| 17808 | 17824 | if (!safety_check_on) |
| 17809 | 17825 | return base_ptr; |
| 17810 | | IrInstruction *c_ptr_val = ir_get_deref(ira, source_instr, base_ptr); |
| 17826 | IrInstruction *c_ptr_val = ir_get_deref(ira, source_instr, base_ptr, nullptr); |
| 17811 | 17827 | ir_build_assert_non_null(ira, source_instr, c_ptr_val); |
| 17812 | 17828 | return base_ptr; |
| 17813 | 17829 | } |
| ... | ... | @@ -18162,7 +18178,7 @@ static IrInstruction *ir_analyze_instruction_switch_target(IrAnalyze *ira, |
| 18162 | 18178 | return result; |
| 18163 | 18179 | } |
| 18164 | 18180 | |
| 18165 | | IrInstruction *result = ir_get_deref(ira, &switch_target_instruction->base, target_value_ptr); |
| 18181 | IrInstruction *result = ir_get_deref(ira, &switch_target_instruction->base, target_value_ptr, nullptr); |
| 18166 | 18182 | result->value.type = target_type; |
| 18167 | 18183 | return result; |
| 18168 | 18184 | } |
| ... | ... | @@ -18192,7 +18208,7 @@ static IrInstruction *ir_analyze_instruction_switch_target(IrAnalyze *ira, |
| 18192 | 18208 | return result; |
| 18193 | 18209 | } |
| 18194 | 18210 | |
| 18195 | | IrInstruction *union_value = ir_get_deref(ira, &switch_target_instruction->base, target_value_ptr); |
| 18211 | IrInstruction *union_value = ir_get_deref(ira, &switch_target_instruction->base, target_value_ptr, nullptr); |
| 18196 | 18212 | union_value->value.type = target_type; |
| 18197 | 18213 | |
| 18198 | 18214 | IrInstruction *union_tag_inst = ir_build_union_tag(&ira->new_irb, switch_target_instruction->base.scope, |
| ... | ... | @@ -18216,7 +18232,7 @@ static IrInstruction *ir_analyze_instruction_switch_target(IrAnalyze *ira, |
| 18216 | 18232 | return result; |
| 18217 | 18233 | } |
| 18218 | 18234 | |
| 18219 | | IrInstruction *enum_value = ir_get_deref(ira, &switch_target_instruction->base, target_value_ptr); |
| 18235 | IrInstruction *enum_value = ir_get_deref(ira, &switch_target_instruction->base, target_value_ptr, nullptr); |
| 18220 | 18236 | enum_value->value.type = target_type; |
| 18221 | 18237 | return enum_value; |
| 18222 | 18238 | } |
| ... | ... | @@ -23105,7 +23121,7 @@ static IrInstruction *ir_analyze_instruction_decl_ref(IrAnalyze *ira, |
| 23105 | 23121 | if (lval == LValPtr) { |
| 23106 | 23122 | return var_ptr; |
| 23107 | 23123 | } else { |
| 23108 | | return ir_get_deref(ira, &instruction->base, var_ptr); |
| 23124 | return ir_get_deref(ira, &instruction->base, var_ptr, nullptr); |
| 23109 | 23125 | } |
| 23110 | 23126 | } |
| 23111 | 23127 | case TldIdFn: { |
| ... | ... | @@ -23640,7 +23656,7 @@ static IrInstruction *ir_analyze_instruction_atomic_load(IrAnalyze *ira, IrInstr |
| 23640 | 23656 | } |
| 23641 | 23657 | |
| 23642 | 23658 | if (instr_is_comptime(casted_ptr)) { |
| 23643 | | IrInstruction *result = ir_get_deref(ira, &instruction->base, casted_ptr); |
| 23659 | IrInstruction *result = ir_get_deref(ira, &instruction->base, casted_ptr, nullptr); |
| 23644 | 23660 | ir_assert(result->value.type != nullptr, &instruction->base); |
| 23645 | 23661 | return result; |
| 23646 | 23662 | } |
| ... | ... | @@ -24474,7 +24490,6 @@ bool ir_has_side_effects(IrInstruction *instruction) { |
| 24474 | 24490 | case IrInstructionIdUnOp: |
| 24475 | 24491 | case IrInstructionIdBinOp: |
| 24476 | 24492 | case IrInstructionIdLoadPtr: |
| 24477 | | case IrInstructionIdLoadPtrGen: |
| 24478 | 24493 | case IrInstructionIdConst: |
| 24479 | 24494 | case IrInstructionIdCast: |
| 24480 | 24495 | case IrInstructionIdContainerInitList: |
| ... | ... | @@ -24585,6 +24600,8 @@ bool ir_has_side_effects(IrInstruction *instruction) { |
| 24585 | 24600 | return reinterpret_cast<IrInstructionErrWrapPayload *>(instruction)->result_loc != nullptr; |
| 24586 | 24601 | case IrInstructionIdErrWrapCode: |
| 24587 | 24602 | return reinterpret_cast<IrInstructionErrWrapCode *>(instruction)->result_loc != nullptr; |
| 24603 | case IrInstructionIdLoadPtrGen: |
| 24604 | return reinterpret_cast<IrInstructionLoadPtrGen *>(instruction)->result_loc != nullptr; |
| 24588 | 24605 | } |
| 24589 | 24606 | zig_unreachable(); |
| 24590 | 24607 | } |