From 71d5a2540a98c81f5bcaeb48805e0e2881f530ef Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:01:22 +0000 Subject: Vendor import of llvm trunk r300422: https://llvm.org/svn/llvm-project/llvm/trunk@300422 --- lib/Fuzzer/FuzzerIO.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/Fuzzer/FuzzerIO.cpp') diff --git a/lib/Fuzzer/FuzzerIO.cpp b/lib/Fuzzer/FuzzerIO.cpp index eda8e8772930..e3f609ed8a80 100644 --- a/lib/Fuzzer/FuzzerIO.cpp +++ b/lib/Fuzzer/FuzzerIO.cpp @@ -96,14 +96,15 @@ void DupAndCloseStderr() { if (NewOutputFile) { OutputFile = NewOutputFile; if (EF->__sanitizer_set_report_fd) - EF->__sanitizer_set_report_fd(reinterpret_cast(OutputFd)); - CloseFile(2); + EF->__sanitizer_set_report_fd( + reinterpret_cast(GetHandleFromFd(OutputFd))); + DiscardOutput(2); } } } void CloseStdout() { - CloseFile(1); + DiscardOutput(1); } void Printf(const char *Fmt, ...) { -- cgit v1.2.3