# stage2: clean up break / noreturn astgen · gitcafe/zig

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

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

Visibility: public

Requested revision: 01bfd835bb9613d21f09c0c4f5b905b077b3d5f9

Requested commit: 01bfd835bb9613d21f09c0c4f5b905b077b3d5f9

Commit: 01bfd835bb9613d21f09c0c4f5b905b077b3d5f9

Tree: 89a9fe2ca68d2055abebee9f17b2136f8e5997cf

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: clean up break / noreturn astgen

 * Module.addBreak and addBreakVoid return zir.Inst.Index not Ref
   because Index is the simpler type and we never need a Ref for these.
 * astgen: make noreturn stuff return the unreachable_value and avoid
   unnecessary calls to rvalue()
 * breakExpr: avoid unnecessary access into the tokens array
 * breakExpr: fix incorrect `@intCast` (previously this unsafely
   casted an Index to a Ref)

```

## Parents

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

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