aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/declextract/fileops.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-11-17 07:50:28 +0100
committerDmitry Vyukov <dvyukov@google.com>2025-11-17 08:54:02 +0000
commita41f43a1ab652ec0629a63d0812a30bfec0e0faf (patch)
tree8e9cbf006b8801400fbdb2b538b1f9755141230f /pkg/declextract/fileops.go
parentcbc18b106abc7ee5cbca73a11b24265328d29516 (diff)
pkg/clangtool: make more generic
Make it possible to use pkg/clangtool with other types than declextract.Output.
Diffstat (limited to 'pkg/declextract/fileops.go')
-rw-r--r--pkg/declextract/fileops.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/declextract/fileops.go b/pkg/declextract/fileops.go
index 8b2ea629a..8af85189f 100644
--- a/pkg/declextract/fileops.go
+++ b/pkg/declextract/fileops.go
@@ -9,6 +9,7 @@ import (
"strings"
"github.com/google/syzkaller/pkg/ast"
+ "github.com/google/syzkaller/pkg/clangtool"
)
const (
@@ -243,7 +244,7 @@ func (ctx *context) mapFileToFops(funcs map[*Function]bool, funcToFops map[*Func
best = append(best, fops)
}
}
- best = sortAndDedupSlice(best)
+ best = clangtool.SortAndDedupSlice(best)
// Now, filter out some excessive file_operations.
// An example of an excessive case is if we have 2 file_operations with just read+write,
// currently we emit generic read/write operations, so we would emit completly equal