forked from GaloisInc/llvm-pretty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store basis type separately in GEP/ConstGEP
With opaque pointers, one cannot tell what the basis type for a `getelementptr` instruction (or constant expression) is by inspecting the parent pointer. As a result, we now store the basis type separately in `GEP`/`ConstGEP` so that it can be determined regardless of whether opaque pointers are used or not. This also requires tweaking the types of the `resolveGepFull` and `resolveGep` functions to make the basis type separate from the parent pointer type. Because this requires making a backwards-incompatible change to `ConstGEP`, I took the opportunity to include the parent pointer value as a distinguished field in `ConstGEP`. The `GEP` data constructor already does this, and it seems oddly asymmetric to not have `ConstGEP` do the same, especially since LLVM requires it to be present. See GaloisInc#102.
- Loading branch information
1 parent
1c4b6de
commit 16bc5bd
Showing
4 changed files
with
47 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters