This commit is contained in:
xushiwei
2024-05-31 07:35:22 +08:00
parent db141e1f3f
commit 3b2f01e974
6 changed files with 307 additions and 244 deletions

View File

@@ -102,7 +102,7 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) {
prog := b.Prog
typ := x.Type
tabi := b.abiType(typ.raw.Type)
kind, _, lvl := abi.KindOf(typ.raw.Type, 0, prog.is32Bits)
kind, _, lvl := abi.DataKindOf(typ.raw.Type, 0, prog.is32Bits)
switch kind {
case abi.Indirect:
vptr := b.AllocU(typ)
@@ -132,7 +132,7 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) {
func (b Builder) valFromData(typ Type, data llvm.Value) Expr {
prog := b.Prog
kind, real, lvl := abi.KindOf(typ.raw.Type, 0, prog.is32Bits)
kind, real, lvl := abi.DataKindOf(typ.raw.Type, 0, prog.is32Bits)
switch kind {
case abi.Indirect:
impl := b.impl