# llvm: fix crashes when loading a struct field · gitcafe/zig

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

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

Visibility: public

Requested revision: 0543def52f5ec2d76dc415da2546e478af491ac3

Requested commit: 0543def52f5ec2d76dc415da2546e478af491ac3

Commit: 0543def52f5ec2d76dc415da2546e478af491ac3

Tree: cd08fe58ac0bf9f030a9f079ad5dff2ab1d0f002

Author: Jacob Young

Committer: Veikka Tuominen

## Message

```
llvm: fix crashes when loading a struct field

The result of buildStructGEP is not always a GEP (sorry), so we can't
use getGEPResultElementType on it.

Closes #14641

```

## Parents

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

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