fix TestNamedStruct

This commit is contained in:
xushiwei
2024-04-27 08:17:46 +08:00
parent 5f08e7a612
commit 00b2fd1479
5 changed files with 13 additions and 13 deletions

View File

@@ -307,7 +307,7 @@ func (b Builder) FieldAddr(x Expr, idx int) Expr {
tstruc := prog.Elem(x.Type)
telem := prog.Field(tstruc, idx)
pt := prog.Pointer(telem)
return Expr{llvm.CreateStructGEP(b.impl, telem.ll, x.impl, idx), pt}
return Expr{llvm.CreateStructGEP(b.impl, tstruc.ll, x.impl, idx), pt}
}
// The IndexAddr instruction yields the address of the element at