mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
all: remove pointer ElementType calls
This is needed for opaque pointers, which are enabled by default in LLVM 15.
This commit is contained in:
committed by
Ron Evans
parent
229746b71e
commit
62df1d7490
+1
-1
@@ -124,7 +124,7 @@ func OptimizeAllocs(mod llvm.Module, printAllocs *regexp.Regexp, logger func(tok
|
||||
alloca.SetAlignment(alignment)
|
||||
|
||||
// Zero the allocation inside the block where the value was originally allocated.
|
||||
zero := llvm.ConstNull(alloca.Type().ElementType())
|
||||
zero := llvm.ConstNull(alloca.AllocatedType())
|
||||
builder.SetInsertPointBefore(bitcast)
|
||||
store := builder.CreateStore(zero, alloca)
|
||||
store.SetAlignment(alignment)
|
||||
|
||||
Reference in New Issue
Block a user