mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace the existing suite of checked cast instructions with: - unconditional_checked_cast, which performs an unconditional cast that aborts on failure (like the former downcast unconditional); and - checked_cast_br, which performs a conditional pass and branches on whether the cast succeeds, passing the result to the true branch as an argument. Both instructions take a CheckedCastKind that discriminates the different casting modes formerly discriminated by instruction type. This eliminates a source of null references in SIL and eliminates null SIL addresses completely. Swift SVN r8696
2.8 KiB
2.8 KiB