Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix confusion between GEP base type and return type
The LLVM GEP instruction is notoriously confusing, and looks like this was yet another victim. The base type of computation is the underlying pointee type of the pointer from which operations are being done. The return type can be the same or something else, depending on what exactly is computed by the GEP operation. The two were conflated here which was creating bugs. They are now distinct, with the base type being obtained from the operand (as it is easy to do), and the return type being provided by the caller (as it is otherwise annoying to computed from the operands).
- Loading branch information