summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerIO.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2019-02-12 22:48:55 +0000
committerKostya Serebryany <kcc@google.com>2019-02-12 22:48:55 +0000
commit5c08e811dec021ac054499907ae2a727c0d8f9ec (patch)
treebb97315d29ca4cb5e0dc1d58d5730f0aa9373cea /compiler-rt/lib/fuzzer/FuzzerIO.cpp
parent27aa8b62d3937d9537c6cd296ae703c173682cf1 (diff)
downloadbcm5719-llvm-5c08e811dec021ac054499907ae2a727c0d8f9ec.tar.gz
bcm5719-llvm-5c08e811dec021ac054499907ae2a727c0d8f9ec.zip
[libFuzzer] move the implementation of the fork mode into a separate file
llvm-svn: 353891
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIO.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerIO.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.cpp b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
index ba4153bfcd2..91e1d20804a 100644
--- a/compiler-rt/lib/fuzzer/FuzzerIO.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
@@ -8,9 +8,10 @@
// IO functions.
//===----------------------------------------------------------------------===//
-#include "FuzzerIO.h"
#include "FuzzerDefs.h"
#include "FuzzerExtFunctions.h"
+#include "FuzzerIO.h"
+#include "FuzzerUtil.h"
#include <algorithm>
#include <cstdarg>
#include <fstream>
@@ -141,4 +142,9 @@ void RmFilesInDir(const std::string &Path) {
RemoveFile(F);
}
+std::string TempPath(const char *Extension) {
+ return DirPlusFile(TmpDir(),
+ "libFuzzerTemp." + std::to_string(GetPid()) + Extension);
+}
+
} // namespace fuzzer
OpenPOWER on IntegriCloud