# stage2: LLVM backend: make unnamed struct globals · gitcafe/zig

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

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

Visibility: public

Requested revision: c10fdde5a64a46bc514500e97b8c87d19f86e431

Requested commit: c10fdde5a64a46bc514500e97b8c87d19f86e431

Commit: c10fdde5a64a46bc514500e97b8c87d19f86e431

Tree: 0512ae6e4bd7082d6df656f53ee174b99fe7f49e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: LLVM backend: make unnamed struct globals

LLVM union globals have to be lowered as unnamed structs if the
non-most-aligned field is the active tag. In this case it bubbles up so
that structs containing unions have the same restriction.

This fix needs to be applied to optionals and other callsites of
createNamedStruct.

The bug fixed in this commit was revealed in searching for
the cause of #10837.

```

## Parents

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

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