# AstGen: improve switch expressions · gitcafe/zig

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

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

Visibility: public

Requested revision: c7b09be8de946d18c2f1afb532beb1b2426fab18

Requested commit: c7b09be8de946d18c2f1afb532beb1b2426fab18

Commit: c7b09be8de946d18c2f1afb532beb1b2426fab18

Tree: 5f92b32f5acb493587c5d4e22176b60c827af696

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
AstGen: improve switch expressions

 * use the proper result location strategy even when there are noreturn
   prongs in the switch expression
 * when using break_operand strategy, actually omit the
   store_to_block_ptr instructions rather than eliding them.
 * for both strategies, properly handle noreturn prongs.

```

## Parents

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

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