mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
unwrap error payload instruction has side effects only if safety check on
This commit is contained in:
parent
cd992b89d2
commit
889bed13c3
@ -12423,7 +12423,6 @@ bool ir_has_side_effects(IrInstruction *instruction) {
|
||||
case IrInstructionIdCheckSwitchProngs:
|
||||
case IrInstructionIdSetGlobalAlign:
|
||||
case IrInstructionIdSetGlobalSection:
|
||||
case IrInstructionIdUnwrapErrPayload:
|
||||
return true;
|
||||
case IrInstructionIdPhi:
|
||||
case IrInstructionIdUnOp:
|
||||
@ -12492,6 +12491,12 @@ bool ir_has_side_effects(IrInstruction *instruction) {
|
||||
IrInstructionAsm *asm_instruction = (IrInstructionAsm *)instruction;
|
||||
return asm_instruction->has_side_effects;
|
||||
}
|
||||
case IrInstructionIdUnwrapErrPayload:
|
||||
{
|
||||
IrInstructionUnwrapErrPayload *unwrap_err_payload_instruction =
|
||||
(IrInstructionUnwrapErrPayload *)instruction;
|
||||
return unwrap_err_payload_instruction->safety_check_on;
|
||||
}
|
||||
}
|
||||
zig_unreachable();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user