ssa: index take addr

This commit is contained in:
visualfc
2024-07-02 21:14:36 +08:00
parent 46423ed166
commit 28d8c56534
9 changed files with 466 additions and 91 deletions

View File

@@ -138,6 +138,8 @@ func (p Program) Zero(t Type) Expr {
ret = llvm.ConstStruct(flds, false)
case *types.Slice:
ret = p.Zero(p.rtType("Slice")).impl
case *types.Array:
ret = llvm.ConstNull(t.ll)
case *types.Interface:
var name string
if u.Empty() {