diff options
Diffstat (limited to 'lib/Fuzzer/FuzzerIOPosix.cpp')
-rw-r--r-- | lib/Fuzzer/FuzzerIOPosix.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Fuzzer/FuzzerIOPosix.cpp b/lib/Fuzzer/FuzzerIOPosix.cpp index 720bc1304594..6d8edf6ff538 100644 --- a/lib/Fuzzer/FuzzerIOPosix.cpp +++ b/lib/Fuzzer/FuzzerIOPosix.cpp @@ -83,6 +83,12 @@ std::string DirName(const std::string &FileName) { return Res; } +std::string TmpDir() { + if (auto Env = getenv("TMPDIR")) + return Env; + return "/tmp"; +} + } // namespace fuzzer #endif // LIBFUZZER_POSIX |