# wasm: Fix unreachable paths · gitcafe/zig

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

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

Visibility: public

Requested revision: be08d2bdbd2f64ccb9ef0f985a57a4bf89b9aebb

Requested commit: be08d2bdbd2f64ccb9ef0f985a57a4bf89b9aebb

Commit: be08d2bdbd2f64ccb9ef0f985a57a4bf89b9aebb

Tree: 727d36adc443701b6aa8221797dc082f3670a290

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Fix unreachable paths

When the last instruction is a debug instruction, the type of it is void.
Similarly for 'noreturn' emit an 'unreachable' instruction to tell the wasm-validator
the path cannot be reached.

Also respect the '--strip' flag in the self-hosted wasm linker and not emit a 'name' section
when the flag is set to `true`.

```

## Parents

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

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