# stage2: add support for optionals in the LLVM backend · gitcafe/zig

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

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

Visibility: public

Requested revision: d4ec0279d3ec59cf33b1b2fbf74f9ae82af753cc

Requested commit: d4ec0279d3ec59cf33b1b2fbf74f9ae82af753cc

Commit: d4ec0279d3ec59cf33b1b2fbf74f9ae82af753cc

Tree: c5c261faf4ec7afa5327aeca94ce6289e86de1bf

Author: Timon Kruiper

Committer: Andrew Kelley

## Message

```
stage2: add support for optionals in the LLVM backend

We can now codegen optionals! This includes the following instructions:
- is_null
- is_null_ptr
- is_non_null
- is_non_null_ptr
- optional_payload
- optional_payload_ptr
- br_void

Also includes a test for optionals.

```

## Parents

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

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