mirror of
https://github.com/ziglang/zig.git
synced 2025-12-20 13:13:16 +00:00
fix bitcast
This commit is contained in:
parent
077f9df15b
commit
f90d17cc4d
@ -23195,7 +23195,12 @@ static IrInstruction *ir_analyze_ptr_cast(IrAnalyze *ira, IrInstruction *source_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IrInstruction *result = ir_const(ira, source_instr, dest_type);
|
IrInstruction *result;
|
||||||
|
if (ptr->value.data.x_ptr.mut == ConstPtrMutInfer) {
|
||||||
|
result = ir_build_ptr_cast_gen(ira, source_instr, dest_type, ptr, safety_check_on);
|
||||||
|
} else {
|
||||||
|
result = ir_const(ira, source_instr, dest_type);
|
||||||
|
}
|
||||||
copy_const_val(&result->value, val, true);
|
copy_const_val(&result->value, val, true);
|
||||||
result->value.type = dest_type;
|
result->value.type = dest_type;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user