# LLVM: Make sure child types get added first · gitcafe/zig

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

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

Visibility: public

Requested revision: 1d94e9ef83835c3549ec294c1b63d4230f9fcc10

Requested commit: 1d94e9ef83835c3549ec294c1b63d4230f9fcc10

Commit: 1d94e9ef83835c3549ec294c1b63d4230f9fcc10

Tree: 85cbb026bf697a805d381392b4364c927042eb78

Author: antlilja

Committer: antlilja

## Message

```
LLVM: Make sure child types get added first

The LLVM bitcode requires all type references in
structs to be to earlier defined types.

We make sure types are ordered in the builder
itself in order to avoid having to iterate the
types multiple times and changing the values
of type indicies.

```

## Parents

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

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