cl: fix package patching

This commit is contained in:
Li Jie
2024-11-25 11:17:06 +08:00
parent 2f5c033f09
commit e732e5158e
3 changed files with 35 additions and 18 deletions

View File

@@ -429,7 +429,7 @@ func (p Program) toLLVMFields(raw *types.Struct) (fields []llvm.Type) {
if n > 0 {
fields = make([]llvm.Type, n)
for i := 0; i < n; i++ {
fields[i] = p.rawType(raw.Field(i).Type()).ll
fields[i] = p.rawType(p.patch(raw.Field(i).Type())).ll
}
}
return
@@ -443,7 +443,7 @@ func (p Program) toLLVMTypes(t *types.Tuple, n int) (ret []llvm.Type) {
if n > 0 {
ret = make([]llvm.Type, n)
for i := 0; i < n; i++ {
ret[i] = p.rawType(t.At(i).Type()).ll
ret[i] = p.rawType(p.patch(t.At(i).Type())).ll
}
}
return