# stage2 llvm backend improvements working towards \`zig test\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 14d8a1c10da7e98ccfdbfd50473582043e48ca10

Requested commit: 14d8a1c10da7e98ccfdbfd50473582043e48ca10

Commit: 14d8a1c10da7e98ccfdbfd50473582043e48ca10

Tree: 0b3e30ce2e327f5019f08f0ba2cc01f79c4f4225

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2 llvm backend improvements working towards `zig test`

 * properly set global variables to const if they are not a global
   variable.
 * implement global variable initializations.
 * initial implementation of llvmType() for structs and functions.
 * implement genTypedValue for variable tags
 * implement more AIR instructions: varptr, slice_ptr, slice_len,
   slice_elem_val, ptr_slice_elem_val, unwrap_errunion_payload,
   unwrap_errunion_payload_ptr, unwrap_errunion_err,
   unwrap_errunion_err_ptr.

```

## Parents

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

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