diff options
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIO.cpp')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerIO.cpp | 9 |
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); |