mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
interp: change object.llvmType to the initializer type
Previously it was a pointer type, which won't work with opaque pointers. Instead, use the global initializer type instead.
This commit is contained in:
committed by
Ron Evans
parent
09ec846c9f
commit
229746b71e
@@ -637,7 +637,7 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
|
||||
// Create the new object.
|
||||
size := operands[0].(literalValue).value.(uint64)
|
||||
alloca := object{
|
||||
llvmType: inst.llvmInst.Type(),
|
||||
llvmType: inst.llvmInst.AllocatedType(),
|
||||
globalName: r.pkgName + "$alloca",
|
||||
buffer: newRawValue(uint32(size)),
|
||||
size: uint32(size),
|
||||
|
||||
Reference in New Issue
Block a user