summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerIO.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2019-02-12 03:12:40 +0000
committerKostya Serebryany <kcc@google.com>2019-02-12 03:12:40 +0000
commit2b9a8f37a484aa7f976829c055147f20b82d39d9 (patch)
tree4d03b66688b8bdfddda69d6def1cf28395bd3e22 /compiler-rt/lib/fuzzer/FuzzerIO.cpp
parent9e624d54100b0c59f980bd0ffbe15d2b2abe7bb5 (diff)
downloadbcm5719-llvm-2b9a8f37a484aa7f976829c055147f20b82d39d9.tar.gz
bcm5719-llvm-2b9a8f37a484aa7f976829c055147f20b82d39d9.zip
[libFuzzer] make the fork mode less verbose
llvm-svn: 353794
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIO.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerIO.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.cpp b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
index a18fba717e6..ba4153bfcd2 100644
--- a/compiler-rt/lib/fuzzer/FuzzerIO.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
@@ -125,6 +125,15 @@ void Printf(const char *Fmt, ...) {
fflush(OutputFile);
}
+void VPrintf(bool Verbose, const char *Fmt, ...) {
+ if (!Verbose) return;
+ va_list ap;
+ va_start(ap, Fmt);
+ vfprintf(OutputFile, Fmt, ap);
+ va_end(ap);
+ fflush(OutputFile);
+}
+
void RmFilesInDir(const std::string &Path) {
Vector<std::string> Files;
ListFilesInDirRecursive(Path, 0, &Files, /*TopDir*/true);
OpenPOWER on IntegriCloud