diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 14:15:52 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 16:02:37 +0200 |
| commit | 66393d1884cb6a6d36dcbe5ad772ae9cf8f2adad (patch) | |
| tree | a8747f057372ed2e2a451a0c0988b99f70a012dc /pkg/compiler/compiler.go | |
| parent | 4f60e46e498eedc0d9407d11d1078208c37d19f1 (diff) | |
pkg/compiler: don't genererate missing syscalls
We used to generate them only because manager had no idea
what arch it is testing. So syscalls numbers had to match
between all arches.
This is not needed anymore.
Also don't generate unreferenced structs/resources.
Diffstat (limited to 'pkg/compiler/compiler.go')
| -rw-r--r-- | pkg/compiler/compiler.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index f6641f9c9..d54ac4678 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -54,6 +54,7 @@ func Compile(desc *ast.Description, consts map[string]uint64, ptrSize uint64, eh structs: make(map[string]*ast.Struct), intFlags: make(map[string]*ast.IntFlags), strFlags: make(map[string]*ast.StrFlags), + used: make(map[string]bool), structDescs: make(map[prog.StructKey]*prog.StructDesc), structNodes: make(map[*prog.StructDesc]*ast.Struct), structVarlen: make(map[string]bool), @@ -88,6 +89,7 @@ type compiler struct { structs map[string]*ast.Struct intFlags map[string]*ast.IntFlags strFlags map[string]*ast.StrFlags + used map[string]bool // contains used structs/resources structDescs map[prog.StructKey]*prog.StructDesc structNodes map[*prog.StructDesc]*ast.Struct |
