| ... | ... | @@ -9237,26 +9237,9 @@ static TypeTableEntry *ir_finish_anal(IrAnalyze *ira, TypeTableEntry *result_typ |
| 9237 | 9237 | } |
| 9238 | 9238 | |
| 9239 | 9239 | static IrInstruction *ir_get_const(IrAnalyze *ira, IrInstruction *old_instruction) { |
| 9240 | | IrInstruction *new_instruction; |
| 9241 | | if (old_instruction->id == IrInstructionIdVarPtr) { |
| 9242 | | IrInstructionVarPtr *old_var_ptr_instruction = (IrInstructionVarPtr *)old_instruction; |
| 9243 | | IrInstructionVarPtr *var_ptr_instruction = ir_create_instruction<IrInstructionVarPtr>(&ira->new_irb, |
| 9244 | | old_instruction->scope, old_instruction->source_node); |
| 9245 | | var_ptr_instruction->var = old_var_ptr_instruction->var; |
| 9246 | | new_instruction = &var_ptr_instruction->base; |
| 9247 | | } else if (old_instruction->id == IrInstructionIdFieldPtr) { |
| 9248 | | IrInstructionFieldPtr *field_ptr_instruction = ir_create_instruction<IrInstructionFieldPtr>(&ira->new_irb, |
| 9249 | | old_instruction->scope, old_instruction->source_node); |
| 9250 | | new_instruction = &field_ptr_instruction->base; |
| 9251 | | } else if (old_instruction->id == IrInstructionIdElemPtr) { |
| 9252 | | IrInstructionElemPtr *elem_ptr_instruction = ir_create_instruction<IrInstructionElemPtr>(&ira->new_irb, |
| 9253 | | old_instruction->scope, old_instruction->source_node); |
| 9254 | | new_instruction = &elem_ptr_instruction->base; |
| 9255 | | } else { |
| 9256 | | IrInstructionConst *const_instruction = ir_create_instruction<IrInstructionConst>(&ira->new_irb, |
| 9257 | | old_instruction->scope, old_instruction->source_node); |
| 9258 | | new_instruction = &const_instruction->base; |
| 9259 | | } |
| 9240 | IrInstructionConst *const_instruction = ir_create_instruction<IrInstructionConst>(&ira->new_irb, |
| 9241 | old_instruction->scope, old_instruction->source_node); |
| 9242 | IrInstruction *new_instruction = &const_instruction->base; |
| 9260 | 9243 | new_instruction->value.special = ConstValSpecialStatic; |
| 9261 | 9244 | return new_instruction; |
| 9262 | 9245 | } |