aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform/gc.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-09-22 13:33:00 +0200
committerRon Evans <[email protected]>2022-10-19 22:23:19 +0200
commit62df1d7490ccf495dc08837ec72ee1d6042bc374 (patch)
tree379a9e4e5f46dc8293beeb3ba1f386f08bdf53c9 /transform/gc.go
parent229746b71ef8c6ab095f0e97aa722959c6f07268 (diff)
downloadtinygo-62df1d7490ccf495dc08837ec72ee1d6042bc374.tar.gz
tinygo-62df1d7490ccf495dc08837ec72ee1d6042bc374.zip
all: remove pointer ElementType calls
This is needed for opaque pointers, which are enabled by default in 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 514fb1bf3..e2d23987f 100644
--- a/transform/gc.go
+++ b/transform/gc.go
@@ -18,7 +18,7 @@ func MakeGCStackSlots(mod llvm.Module) bool {
stackChainStart := mod.NamedGlobal("runtime.stackChainStart")
if !stackChainStart.IsNil() {
stackChainStart.SetLinkage(llvm.InternalLinkage)
- stackChainStart.SetInitializer(llvm.ConstNull(stackChainStart.Type().ElementType()))
+ stackChainStart.SetInitializer(llvm.ConstNull(stackChainStart.GlobalValueType()))
stackChainStart.SetGlobalConstant(true)
}
return false
@@ -96,7 +96,7 @@ func MakeGCStackSlots(mod llvm.Module) bool {
return false
}
stackChainStart.SetLinkage(llvm.InternalLinkage)
- stackChainStartType := stackChainStart.Type().ElementType()
+ stackChainStartType := stackChainStart.GlobalValueType()
stackChainStart.SetInitializer(llvm.ConstNull(stackChainStartType))
// Iterate until runtime.trackPointer has no uses left.