diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:49 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:49 +0000 | 
| commit | e2fd426bdafe9f5c10066d3926ece6e342184a67 (patch) | |
| tree | bfbbb5fd38554e6b8988b7a217e9fd0623728d7d /Common/ErrorHandler.cpp | |
| parent | 84c4061b34e048f47e5eb4fbabc1558495e8157c (diff) | |
Notes
Diffstat (limited to 'Common/ErrorHandler.cpp')
| -rw-r--r-- | Common/ErrorHandler.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/Common/ErrorHandler.cpp b/Common/ErrorHandler.cpp index d1cb3dbbe03c..c059516daf94 100644 --- a/Common/ErrorHandler.cpp +++ b/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  | 
