translator: getelementptr fix llvm-3.6

This commit is contained in:
e5l
2016-07-18 12:11:16 +03:00
parent fef7a3c463
commit 5147b63080
@@ -110,7 +110,7 @@ class LLVMBuilder(val arm: Boolean) {
}
fun loadClassField(target: LLVMVariable, source: LLVMVariable, offset: Int) {
val code = "$target = getelementptr inbounds ${source.type}, ${source.type}* $source, i32 0, i32 $offset"
val code = "$target = getelementptr inbounds ${source.type}* $source, i32 0, i32 $offset"
llvmLocalCode.appendln(code)
}
@@ -129,7 +129,7 @@ class LLVMBuilder(val arm: Boolean) {
}
fun loadVariableOffset(target: LLVMVariable, source: LLVMVariable, index: LLVMConstant) {
val code = "$target = getelementptr inbounds ${target.type}, ${source.type} $source, ${index.type} ${index.value}"
val code = "$target = getelementptr inbounds ${source.type} $source, ${index.type} ${index.value}"
llvmLocalCode.appendln(code)
}