# stage2 llvm: Respect container type when lowering parent pointers · gitcafe/zig

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

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

Visibility: public

Requested revision: 1f76b4c6b84c1fd7d370bde75b8e37822bd85086

Requested commit: 1f76b4c6b84c1fd7d370bde75b8e37822bd85086

Commit: 1f76b4c6b84c1fd7d370bde75b8e37822bd85086

Tree: 09d06339aba8246977d7c9cc3e79b60c14e2f9c2

Author: Cody Tapscott

Committer: Andrew Kelley

## Message

```
stage2 llvm: Respect container type when lowering parent pointers

We need to make sure that we bitcast our pointers correctly before
we use get_element_ptr to compute the offset for the parent
pointer.

This also includes a small fix-up for a problem where ptrs to const
i64/u64 were not using the correct type in >1-level decl chains
(where we call lowerParentPtr recursively)

```

## Parents

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

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