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) {...@@ -12423,7 +12423,6 @@ bool ir_has_side_effects(IrInstruction *instruction) {
12423 case IrInstructionIdCheckSwitchProngs:12423 case IrInstructionIdCheckSwitchProngs:
12424 case IrInstructionIdSetGlobalAlign:12424 case IrInstructionIdSetGlobalAlign:
12425 case IrInstructionIdSetGlobalSection:12425 case IrInstructionIdSetGlobalSection:
12426 case IrInstructionIdUnwrapErrPayload:
12427 return true;12426 return true;
12428 case IrInstructionIdPhi:12427 case IrInstructionIdPhi:
12429 case IrInstructionIdUnOp:12428 case IrInstructionIdUnOp:
...@@ -12492,6 +12491,12 @@ bool ir_has_side_effects(IrInstruction *instruction) {...@@ -12492,6 +12491,12 @@ bool ir_has_side_effects(IrInstruction *instruction) {
12492 IrInstructionAsm *asm_instruction = (IrInstructionAsm *)instruction;12491 IrInstructionAsm *asm_instruction = (IrInstructionAsm *)instruction;
12493 return asm_instruction->has_side_effects;12492 return asm_instruction->has_side_effects;
12494 }12493 }
12494 case IrInstructionIdUnwrapErrPayload:
12495 {
12496 IrInstructionUnwrapErrPayload *unwrap_err_payload_instruction =
12497 (IrInstructionUnwrapErrPayload *)instruction;
12498 return unwrap_err_payload_instruction->safety_check_on;
12499 }
12495 }12500 }
12496 zig_unreachable();12501 zig_unreachable();
12497}12502}