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

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

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

Visibility: public

Requested revision: 9a99bd3a71f1b20afd155f440c8dedd69273e8cb

Requested commit: 9a99bd3a71f1b20afd155f440c8dedd69273e8cb

Commit: 9a99bd3a71f1b20afd155f440c8dedd69273e8cb

Tree: f062bc2a69ec566dbab245c90520f81310c3efd0

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 all the asserts that were coming in from
llvm master branch.

```

## Parents

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

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