mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 04:23:41 +00:00
all: add type parameter to *GEP calls
This is necessary for LLVM 15.
This commit is contained in:
committed by
Ron Evans
parent
7b6a9fab42
commit
f57cffce2d
+1
-1
@@ -1146,7 +1146,7 @@ func setGlobalValues(mod llvm.Module, globals map[string]map[string]string) erro
|
||||
|
||||
// Create the string value, which is a {ptr, len} pair.
|
||||
zero := llvm.ConstInt(mod.Context().Int32Type(), 0, false)
|
||||
ptr := llvm.ConstGEP(buf, []llvm.Value{zero, zero})
|
||||
ptr := llvm.ConstGEP(bufInitializer.Type(), buf, []llvm.Value{zero, zero})
|
||||
if ptr.Type() != elementTypes[0] {
|
||||
return fmt.Errorf("%s: not a string", globalName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user