# codegen: handle dbg_var scoping correctly after eliding more ZIR blocks · gitcafe/zig

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

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

Visibility: public

Requested revision: 321045cf33268e7b75e2972d898010ecacc345dc

Requested commit: 321045cf33268e7b75e2972d898010ecacc345dc

Commit: 321045cf33268e7b75e2972d898010ecacc345dc

Tree: 0d296a3879ad1e6feb059947150dbbac933b547f

Author: mlugg

Committer: mlugg

## Message

```
codegen: handle dbg_var scoping correctly after eliding more ZIR blocks

Since we now elide more ZIR blocks in AstGen, care must be taken in
codegen to introduce lexical scopes for every body, not just `block`s.

Also, elide a few unnecessary AIR blocks in Sema.

```

## Parents

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

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