authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-02-24 15:11:33-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-02-24 15:11:33-05:00
log889bed13c34a241a8767e9e737c2bc18a09826e1
tree1af7ee4739b9af5b415fb39d1d1a2fef44c65484
parentcd992b89d2252fade1e56b5e4e7537b171af890e

unwrap error payload instruction has side effects only if safety check on


1 files changed, 6 insertions(+), 1 deletions(-)

src/ir.cpp+6-1
......@@ -12423,7 +12423,6 @@ bool ir_has_side_effects(IrInstruction *instruction) {
1242312423 case IrInstructionIdCheckSwitchProngs:
1242412424 case IrInstructionIdSetGlobalAlign:
1242512425 case IrInstructionIdSetGlobalSection:
12426 case IrInstructionIdUnwrapErrPayload:
1242712426 return true;
1242812427 case IrInstructionIdPhi:
1242912428 case IrInstructionIdUnOp:
......@@ -12492,6 +12491,12 @@ bool ir_has_side_effects(IrInstruction *instruction) {
1249212491 IrInstructionAsm *asm_instruction = (IrInstructionAsm *)instruction;
1249312492 return asm_instruction->has_side_effects;
1249412493 }
12494 case IrInstructionIdUnwrapErrPayload:
12495 {
12496 IrInstructionUnwrapErrPayload *unwrap_err_payload_instruction =
12497 (IrInstructionUnwrapErrPayload *)instruction;
12498 return unwrap_err_payload_instruction->safety_check_on;
12499 }
1249512500 }
1249612501 zig_unreachable();
1249712502}