summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerIOPosix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerIOPosix.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerIOPosix.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerIOPosix.cpp b/llvm/lib/Fuzzer/FuzzerIOPosix.cpp
index 6d8edf6ff53..494ec9e6c83 100644
--- a/llvm/lib/Fuzzer/FuzzerIOPosix.cpp
+++ b/llvm/lib/Fuzzer/FuzzerIOPosix.cpp
@@ -89,6 +89,18 @@ std::string TmpDir() {
return "/tmp";
}
+bool IsInterestingCoverageFile(const std::string &FileName) {
+ if (FileName.find("compiler-rt/lib/") != std::string::npos)
+ return false; // sanitizer internal.
+ if (FileName.find("/usr/lib/") != std::string::npos)
+ return false;
+ if (FileName.find("/usr/include/") != std::string::npos)
+ return false;
+ if (FileName == "<null>")
+ return false;
+ return true;
+}
+
} // namespace fuzzer
#endif // LIBFUZZER_POSIX
OpenPOWER on IntegriCloud