Commit Graph

4 Commits

Author SHA1 Message Date
Rafael Espindola a4884cc38f Try harder to delete the temporary file.
It is really hard to cover restarts in a debugger, SIGKILL or power
failures. I will try to handle them in a followup patch, but it will
not support all the systems lld has to run on.

RemoveFileOnSignal takes care of crashes.

So what is left is making sure all regular exits delete the file. This
patch does that by moving the buffer to error handling. That is a bit
of a hack, but seemed better than to generalize it to take a callback on
construction.

I will implement this on COFF on the next patch.

llvm-svn: 318060
2017-11-13 18:06:43 +00:00
Rafael Espindola 37a575f8b6 Delete dead code.
llvm-svn: 317633
2017-11-07 23:12:41 +00:00
Rui Ueyama 3fa55c5026 Instead of enclosing an entire file, add lld:: specifier for public functions.
llvm-svn: 316776
2017-10-27 18:04:49 +00:00
Bob Haarman b8a59c8aa5 [lld] unified COFF and ELF error handling on new Common/ErrorHandler
Summary:
The COFF linker and the ELF linker have long had similar but separate
Error.h and Error.cpp files to implement error handling. This change
introduces new error handling code in Common/ErrorHandler.h, changes the
COFF and ELF linkers to use it, and removes the old, separate
implementations.

Reviewers: ruiu

Reviewed By: ruiu

Subscribers: smeenai, jyknight, emaste, sdardis, nemanjai, nhaehnle, mgorny, javed.absar, kbarton, fedor.sergeev, llvm-commits

Differential Revision: https://reviews.llvm.org/D39259

llvm-svn: 316624
2017-10-25 22:28:38 +00:00