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
This commit is contained in:
Rafael Espindola 2017-11-13 18:15:22 +00:00
parent 4ee864b763
commit 0a7d0230fc
1 changed files with 2 additions and 1 deletions

View File

@ -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;