ssa: rtIface, rtSlice

This commit is contained in:
xushiwei
2024-04-27 18:13:16 +08:00
parent 6a02c3ac4c
commit 6a3eb2f2f9
2 changed files with 24 additions and 3 deletions

View File

@@ -242,9 +242,9 @@ func (p Program) toLLVMType(typ types.Type) Type {
elem := p.Type(t.Elem())
return &aType{llvm.PointerType(elem.ll, 0), typ, vkInvalid}
case *types.Interface:
return p.toLLVMNamed(p.rtType("Interface"))
return &aType{p.rtIface(), typ, vkInvalid}
case *types.Slice:
return p.toLLVMNamed(p.rtType("Slice"))
return &aType{p.rtSlice(), typ, vkInvalid}
case *types.Map:
case *types.Struct:
return p.toLLVMStruct(t)