mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, when in the debugger and dumping out SIL code, the printer would crash if it encountered a null operand. If you are dumping a basic block, this means that the dump stops at that instruction instead of showing you the whole block. Null operands can happen when you call dropAllReferences() but have yet to delete the instruction. Now the printer is a bit more resilient. We probably don't catch all the cases, but we handle a lot of them, e.g.: %116 = apply <<NULL OPERAND>>(<<NULL OPERAND>>, <<NULL OPERAND>>) : <<NULL CALLEE>> debug_value <<NULL OPERAND>>, let, name "c", argno 1 // id: %120 retain_value <<NULL OPERAND>> // id: %138 Since this is only relevant to invalid IR, this is just a debugging aid, so no testcase.
3.7 KiB
3.7 KiB