compiler: refactor runtime.alloc call

This refactor makes no other changes.
This commit is contained in:
Ayke van Laethem
2026-05-25 18:09:01 +02:00
committed by Ron Evans
parent 5f66260c3a
commit 7ffbcbc666
4 changed files with 23 additions and 19 deletions
+1 -1
View File
@@ -505,7 +505,7 @@ func (b *builder) createDefer(instr *ssa.Defer) {
size := b.targetData.TypeAllocSize(deferredCallType)
sizeValue := llvm.ConstInt(b.uintptrType, size, false)
nilPtr := llvm.ConstNull(b.dataPtrType)
alloca = b.createRuntimeCall(b.allocFunc(), []llvm.Value{sizeValue, nilPtr}, "defer.alloc.call")
alloca = b.createAlloc(sizeValue, nilPtr, 0, "defer.alloc.call")
}
if b.NeedsStackObjects {
b.trackPointer(alloca)