diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-11-13 18:15:22 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-11-13 18:15:22 +0000 |
| commit | 0a7d0230fcf7d0fa0f90dd9800b9106fd216c93a (patch) | |
| tree | 8a23ab5ab494edebe5725c90309655683b6526af | |
| parent | 4ee864b763a2cc67955ea87f0a1d56743b1cf097 (diff) | |
| download | bcm5719-llvm-0a7d0230fcf7d0fa0f90dd9800b9106fd216c93a.tar.gz bcm5719-llvm-0a7d0230fcf7d0fa0f90dd9800b9106fd216c93a.zip | |
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
| -rw-r--r-- | lld/COFF/Writer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp index a10a33fbd02..e22a82aaca4 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<StringRef, std::vector<DefinedImportData *>> binImports(); - std::unique_ptr<FileOutputBuffer> Buffer; + std::unique_ptr<FileOutputBuffer> &Buffer; std::vector<OutputSection *> OutputSections; std::vector<char> Strtab; std::vector<llvm::object::coff_symbol16> OutputSymtab; |

