# LLVM: fix tripping assertions · gitcafe/zig

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

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

Visibility: public

Requested revision: f6aaab9406807305c2b48fcd742449c9e91f1851

Requested commit: f6aaab9406807305c2b48fcd742449c9e91f1851

Commit: f6aaab9406807305c2b48fcd742449c9e91f1851

Tree: 2eeae513df72230b216a77c627a612239e7df6e9

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
LLVM: fix tripping assertions

Packed structs were tripping an LLVM assertion due to calling
`LLVMConstZExt` from i16 to i16. Solved by using instead
`LLVMConstZExtOrBitCast`.

Unions were tripping an LLVM assertion due to a typo using the union
llvm type to construct an integer value rather than the tag type.

```

## Parents

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

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