aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp/interpreter.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-09-22 01:06:40 +0200
committerRon Evans <[email protected]>2022-10-19 22:23:19 +0200
commit229746b71ef8c6ab095f0e97aa722959c6f07268 (patch)
treee0270085fdb27908533b27708bf8c5f8da704e60 /interp/interpreter.go
parent09ec846c9f3204837ae0695077f6e1359c545fe9 (diff)
downloadtinygo-229746b71ef8c6ab095f0e97aa722959c6f07268.tar.gz
tinygo-229746b71ef8c6ab095f0e97aa722959c6f07268.zip
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.
Diffstat (limited to 'interp/interpreter.go')
-rw-r--r--interp/interpreter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/interp/interpreter.go b/interp/interpreter.go
index d029aa333..8c783a706 100644
--- a/interp/interpreter.go
+++ b/interp/interpreter.go
@@ -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),