From 3e08b3a4f89ee8e6102fcc67fc7e77c5e3eba104 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 7 Feb 2019 17:07:18 -0500 Subject: update embedded LLD to 8.0.0rc2 --- deps/lld/Common/ErrorHandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'deps/lld/Common/ErrorHandler.cpp') 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 -- cgit v1.2.3