diff options
author | Ayke van Laethem <[email protected]> | 2022-09-22 01:06:40 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-10-19 22:23:19 +0200 |
commit | 229746b71ef8c6ab095f0e97aa722959c6f07268 (patch) | |
tree | e0270085fdb27908533b27708bf8c5f8da704e60 /interp/interpreter.go | |
parent | 09ec846c9f3204837ae0695077f6e1359c545fe9 (diff) | |
download | tinygo-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.go | 2 |
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), |