diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:01:25 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:01:25 +0000 |
commit | d8e91e46262bc44006913e6796843909f1ac7bcd (patch) | |
tree | 7d0c143d9b38190e0fa0180805389da22cd834c5 /lib/Support/FileOutputBuffer.cpp | |
parent | b7eb8e35e481a74962664b63dfb09483b200209a (diff) |
Notes
Diffstat (limited to 'lib/Support/FileOutputBuffer.cpp')
-rw-r--r-- | lib/Support/FileOutputBuffer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Support/FileOutputBuffer.cpp b/lib/Support/FileOutputBuffer.cpp index 1214b5a0ba1f..b8223126227d 100644 --- a/lib/Support/FileOutputBuffer.cpp +++ b/lib/Support/FileOutputBuffer.cpp @@ -61,6 +61,12 @@ public: consumeError(Temp.discard()); } + void discard() override { + // Delete the temp file if it still was open, but keeping the mapping + // active. + consumeError(Temp.discard()); + } + private: std::unique_ptr<fs::mapped_file_region> Buffer; fs::TempFile Temp; |