aboutsummaryrefslogtreecommitdiff
path: root/deps/lld/Common/ErrorHandler.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-07 17:07:18 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-07 17:07:18 -0500
commit3e08b3a4f89ee8e6102fcc67fc7e77c5e3eba104 (patch)
treee45ce5ccef05c44a202de42901bb3513ac0b178b /deps/lld/Common/ErrorHandler.cpp
parent91baa574a5f7224b48e4499a9db0c5283d800ec3 (diff)
downloadzig-3e08b3a4f89ee8e6102fcc67fc7e77c5e3eba104.tar.gz
zig-3e08b3a4f89ee8e6102fcc67fc7e77c5e3eba104.zip
update embedded LLD to 8.0.0rc2
Diffstat (limited to 'deps/lld/Common/ErrorHandler.cpp')
-rw-r--r--deps/lld/Common/ErrorHandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/lld/Common/ErrorHandler.cpp b/deps/lld/Common/ErrorHandler.cpp
index d1cb3dbbe0..c059516daf 100644
--- a/deps/lld/Common/ErrorHandler.cpp
+++ b/deps/lld/Common/ErrorHandler.cpp
@@ -47,8 +47,9 @@ ErrorHandler &lld::errorHandler() {
}
void lld::exitLld(int Val) {
- // Delete the output buffer so that any tempory file is deleted.
- errorHandler().OutputBuffer.reset();
+ // Delete any temporary file, while keeping the memory mapping open.
+ if (errorHandler().OutputBuffer)
+ errorHandler().OutputBuffer->discard();
// Dealloc/destroy ManagedStatic variables before calling
// _exit(). In a non-LTO build, this is a nop. In an LTO