diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-03-20 13:34:07 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-03-20 13:34:07 -0400 |
| commit | 3c7555cb679492f3f1c0ce320cbdf4a3769e56db (patch) | |
| tree | 6a59ff4cd7d7e27e8d066fb3d3e07be6dffa012b /deps/lld/Common/ErrorHandler.cpp | |
| parent | 2fdf69bc4082c49a571c0ee7bb7441d910def795 (diff) | |
| parent | 1b25dcde9691835d0c3f5449f4c9565b9074de0e (diff) | |
| download | zig-3c7555cb679492f3f1c0ce320cbdf4a3769e56db.tar.gz zig-3c7555cb679492f3f1c0ce320cbdf4a3769e56db.zip | |
Merge remote-tracking branch 'origin/llvm8'
Diffstat (limited to 'deps/lld/Common/ErrorHandler.cpp')
| -rw-r--r-- | deps/lld/Common/ErrorHandler.cpp | 5 |
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 |
