summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/main.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-05-09 13:31:11 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-05-09 13:31:11 +0000
commit484983f453c1c29725a02262124beea52a7bbd0b (patch)
tree6b2027092a99f8e3086bad284b9fad0bd9eab41b /lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/main.cpp
parentaf742d51ad622b158f71523369fc8998b35ffb3c (diff)
downloadbcm5719-llvm-484983f453c1c29725a02262124beea52a7bbd0b.tar.gz
bcm5719-llvm-484983f453c1c29725a02262124beea52a7bbd0b.zip
Fix bug where temporary file would be left behind every time an archive was updated.
When updating an existing archive, llvm-ar opens the old archive into a `MemoryBuffer`, does its thing, and writes the results to a temporary file. That file is then renamed to the original archive filename, thus replacing it with the updated contents. However, on Windows at least, what would happen is that the `MemoryBuffer` for the old archive would actually be an mmap'ed view of the file, so when it came time to do the rename via Win32's `ReplaceFile`, it would succeed but would be unable to fully replace the file since there would still be a handle open on it; instead, the old version got renamed to a random temporary name and left behind. Patch by Cameron! llvm-svn: 268916
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud