# Sema: harden \`switch\` logic against undef IB · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c7c4e8d802c5c8ab2dc9d064c3985836e6677115)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c7c4e8d802c5c8ab2dc9d064c3985836e6677115

Requested commit: c7c4e8d802c5c8ab2dc9d064c3985836e6677115

Commit: c7c4e8d802c5c8ab2dc9d064c3985836e6677115

Tree: 2350f65e220a00aae2b0dcdb020592775e72d2b1

Author: Justus Klausecker

Committer: Alex Rønne Petersen

## Message

```
Sema: harden `switch` logic against undef IB

Most places where `undefined` was previously (intentionally) passed across
function calls now use `Air.Inst.Ref.none` instead to ensure that these
`undefined` references don't accidentally outlive the `switch` logic they
belong to.

```

## Parents

- [fa988e88ed21485830a70276b5c7567efb122f80](https://git.cafe/gitcafe/zig/commit/fa988e88ed21485830a70276b5c7567efb122f80?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c7c4e8d802c5c8ab2dc9d064c3985836e6677115?format=markdown)
