summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerIO.cpp
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2018-08-29 18:40:41 +0000
committerMatt Morehouse <mascasa@google.com>2018-08-29 18:40:41 +0000
commitcf311cfc20a363ba1ee1a8115ab307d6745a6b73 (patch)
treeb08c29bb56ec4cd15a376d479731e5c5ef9ec4e8 /compiler-rt/lib/fuzzer/FuzzerIO.cpp
parent8d8e1235abf72375b77ff7ad1e3b56dce32d23c0 (diff)
downloadbcm5719-llvm-cf311cfc20a363ba1ee1a8115ab307d6745a6b73.tar.gz
bcm5719-llvm-cf311cfc20a363ba1ee1a8115ab307d6745a6b73.zip
Revert "[libFuzzer] Port to Windows"
This reverts r340949 due to bot breakage again. llvm-svn: 340954
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIO.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerIO.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.cpp b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
index dac5ec658f1..f3ead0ec535 100644
--- a/compiler-rt/lib/fuzzer/FuzzerIO.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
@@ -100,6 +100,14 @@ std::string DirPlusFile(const std::string &DirPath,
return DirPath + GetSeparator() + FileName;
}
+std::string Basename(const std::string &Path, char Separator) {
+ size_t Pos = Path.rfind(Separator);
+ if (Pos == std::string::npos)
+ return Path;
+ assert(Pos < Path.size());
+ return Path.substr(Pos + 1);
+}
+
void DupAndCloseStderr() {
int OutputFd = DuplicateFile(2);
if (OutputFd > 0) {
OpenPOWER on IntegriCloud