all: add support for go 1.13

This commit is contained in:
Jaden Weiss
2019-09-22 12:31:05 -04:00
committed by Ayke van Laethem
parent 6c9e55bd06
commit 17ef7a5c32
8 changed files with 79 additions and 15 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ func (v *LocalValue) GetElementPtr(indices []uint32) Value {
return &LocalValue{v.Eval, gep}
}
switch v.Underlying.Opcode() {
case llvm.GetElementPtr, llvm.IntToPtr:
case llvm.GetElementPtr, llvm.IntToPtr, llvm.BitCast:
int32Type := v.Underlying.Type().Context().Int32Type()
llvmIndices := getLLVMIndices(int32Type, indices)
return &LocalValue{v.Eval, llvm.ConstGEP(v.Underlying, llvmIndices)}