From a41f43a1ab652ec0629a63d0812a30bfec0e0faf Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Nov 2025 07:50:28 +0100 Subject: pkg/clangtool: make more generic Make it possible to use pkg/clangtool with other types than declextract.Output. --- pkg/declextract/interface.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/declextract/interface.go') diff --git a/pkg/declextract/interface.go b/pkg/declextract/interface.go index f386f398b..73806ec4b 100644 --- a/pkg/declextract/interface.go +++ b/pkg/declextract/interface.go @@ -8,6 +8,7 @@ import ( "slices" "strings" + "github.com/google/syzkaller/pkg/clangtool" "github.com/google/syzkaller/pkg/cover" ) @@ -55,7 +56,7 @@ func (ctx *context) noteInterface(iface *Interface) { } func (ctx *context) finishInterfaces() { - ctx.interfaces = sortAndDedupSlice(ctx.interfaces) + ctx.interfaces = clangtool.SortAndDedupSlice(ctx.interfaces) count := make(map[string]int) for _, iface := range ctx.interfaces { count[iface.Type+iface.Name]++ @@ -77,7 +78,7 @@ func (ctx *context) finishInterfaces() { iface.Access = AccessUnknown } } - ctx.interfaces = sortAndDedupSlice(ctx.interfaces) + ctx.interfaces = clangtool.SortAndDedupSlice(ctx.interfaces) } func (ctx *context) processFunctions() { -- cgit mrf-deployment