File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,16 @@ func AllTargets() []*Target {
127127 return res
128128}
129129
130+ // Extend extends a target with a new set of syscalls, types, and resources.
131+ // It is assumed that all new syscalls, types, and resources do not conflict
132+ // with those already present in the target.
133+ func (target * Target ) Extend (syscalls []* Syscall , types []Type , resources []* ResourceDesc ) {
134+ target .Syscalls = append (target .Syscalls , syscalls ... )
135+ target .Types = append (target .Types , types ... )
136+ target .Resources = append (target .Resources , resources ... )
137+ target .initTarget ()
138+ }
139+
130140func (target * Target ) lazyInit () {
131141 target .Neutralize = func (c * Call , fixStructure bool ) error { return nil }
132142 target .AnnotateCall = func (c ExecCall ) string { return "" }
You can’t perform that action at this time.
0 commit comments