forked from OSchip/llvm-project
[Common] Discard the temp file while keeping the memory mapping open, on errors
Differential Revision: https://reviews.llvm.org/D51095 llvm-svn: 340635
This commit is contained in:
parent
4153e9fbb1
commit
0f3d8e2360
|
@ -47,8 +47,9 @@ ErrorHandler &lld::errorHandler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void lld::exitLld(int Val) {
|
void lld::exitLld(int Val) {
|
||||||
// Delete the output buffer so that any tempory file is deleted.
|
// Delete any temporary file, while keeping the memory mapping open.
|
||||||
errorHandler().OutputBuffer.reset();
|
if (errorHandler().OutputBuffer)
|
||||||
|
errorHandler().OutputBuffer->discard();
|
||||||
|
|
||||||
// Dealloc/destroy ManagedStatic variables before calling
|
// Dealloc/destroy ManagedStatic variables before calling
|
||||||
// _exit(). In a non-LTO build, this is a nop. In an LTO
|
// _exit(). In a non-LTO build, this is a nop. In an LTO
|
||||||
|
|
Loading…
Reference in New Issue