aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform/gc.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-09-21 17:00:09 +0200
committerRon Evans <[email protected]>2022-10-19 22:23:19 +0200
commitf57cffce2d47f7c2b3c9ec1ddd1f077f0830d435 (patch)
tree316ab792c0442635e3f7cb0facfdee3d9d8bcf9b /transform/gc.go
parent7b6a9fab4206bde1a11c3a8d79631a0e8ac71a82 (diff)
downloadtinygo-f57cffce2d47f7c2b3c9ec1ddd1f077f0830d435.tar.gz
tinygo-f57cffce2d47f7c2b3c9ec1ddd1f077f0830d435.zip
all: add type parameter to *GEP calls
This is necessary for LLVM 15.
Diffstat (limited to 'transform/gc.go')
-rw-r--r--transform/gc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/transform/gc.go b/transform/gc.go
index 7a4e99aca..3870a6b60 100644
--- a/transform/gc.go
+++ b/transform/gc.go
@@ -223,7 +223,7 @@ func MakeGCStackSlots(mod llvm.Module) bool {
// Update stack start.
parent := builder.CreateLoad(stackChainStartType, stackChainStart, "")
- gep := builder.CreateGEP(stackObject, []llvm.Value{
+ gep := builder.CreateGEP(stackObjectType, stackObject, []llvm.Value{
llvm.ConstInt(ctx.Int32Type(), 0, false),
llvm.ConstInt(ctx.Int32Type(), 0, false),
}, "")
@@ -244,7 +244,7 @@ func MakeGCStackSlots(mod llvm.Module) bool {
builder.SetInsertPointBefore(insertionPoint)
// Extract a pointer to the appropriate section of the stack object.
- gep := builder.CreateGEP(stackObject, []llvm.Value{
+ gep := builder.CreateGEP(stackObjectType, stackObject, []llvm.Value{
llvm.ConstInt(ctx.Int32Type(), 0, false),
llvm.ConstInt(ctx.Int32Type(), uint64(2+i), false),
}, "")