diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-05-01 17:19:27 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-05-02 12:16:06 +0200 |
| commit | 58da4c35b15200b7279f18ea15bc8644618aae78 (patch) | |
| tree | 412d59572c980c4eb582d6d0e187eb6ec32345c9 /prog/any_test.go | |
| parent | bc734e7ada413654f1b7d948b2a857260a52dd9c (diff) | |
prog: introduce Field type
Remvoe FieldName from Type and add a separate Field type
that holds field name. Use Field for struct fields, union options
and syscalls arguments, only these really have names.
Reduces size of sys/linux/gen/amd64.go from 5665583 to 5201321 (-8.2%).
Allows to not create new type for squashed any pointer.
But main advantages will follow, e.g. removing StructDesc,
using TypeRef in Arg, etc.
Update #1580
Diffstat (limited to 'prog/any_test.go')
| -rw-r--r-- | prog/any_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/any_test.go b/prog/any_test.go index 968d1624a..e481ef1c1 100644 --- a/prog/any_test.go +++ b/prog/any_test.go @@ -61,12 +61,12 @@ func TestSquash(t *testing.T) { if target.ArgContainsAny(ptrArg) { t.Fatalf("arg is already squashed") } - target.squashPtr(ptrArg, true) + target.squashPtr(ptrArg) if !target.ArgContainsAny(ptrArg) { t.Fatalf("arg is not squashed") } p1 := strings.TrimSpace(string(p.Serialize())) - target.squashPtr(ptrArg, true) + target.squashPtr(ptrArg) p2 := strings.TrimSpace(string(p.Serialize())) if p1 != p2 { t.Fatalf("double squash changed program:\n%v\nvs:\n%v", p1, p2) |
