# use llvm named structs for const values when possible · gitcafe/zig

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

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

Visibility: public

Requested revision: f1072d0d9fba397b3920015fd854414868e6ea17

Requested commit: f1072d0d9fba397b3920015fd854414868e6ea17

Commit: f1072d0d9fba397b3920015fd854414868e6ea17

Tree: a13926e0dff5a5e9a69ec90e5d64d4ea60b2a10a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
use llvm named structs for const values when possible

normally we want to use llvm types for constants. but
union constants (which are found inside enums) when
they are initialized with the non-most-aligned-member
must be unnamed structs.

these bubble up to all aggregate types. if a constant of
an aggregate type contains, recursively, a union constant
with a non-most-aligned-member initialized, the aggregate
typed constant must be unnamed too.

this fixes some of the asserts that were coming in from
llvm master branch.

```

## Parents

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

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