From: Rafael Espindola Date: Mon, 13 Nov 2017 18:15:22 +0000 (+0000) Subject: Try harder to delete the temporary file. X-Git-Tag: llvmorg-6.0.0-rc1~3529 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a7d0230fcf7d0fa0f90dd9800b9106fd216c93a;p=platform%2Fupstream%2Fllvm.git Try harder to delete the temporary file. This changes COFF to use the output buffer that is reset by the error handler. llvm-svn: 318062 --- diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index a10a33f..e22a82a 100644 --- a/lld/COFF/Writer.cpp +++ b/lld/COFF/Writer.cpp @@ -108,6 +108,7 @@ public: // The writer writes a SymbolTable result to a file. class Writer { public: + Writer() : Buffer(errorHandler().OutputBuffer) {} void run(); private: @@ -137,7 +138,7 @@ private: uint32_t getSizeOfInitializedData(); std::map> binImports(); - std::unique_ptr Buffer; + std::unique_ptr &Buffer; std::vector OutputSections; std::vector Strtab; std::vector OutputSymtab;