aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Signposts.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-01-26 16:01:36 -0800
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-04-08 16:26:35 -0700
commit429088b9e214b2f39f6063a6b3639560fc7db47b (patch)
treebe73669c2b9eb26017bf129158980fa1c8bbac3f /llvm/lib/Support/Signposts.cpp
parent38b106f6815716db4757a813d28ba4649d083c14 (diff)
downloadllvm-429088b9e214b2f39f6063a6b3639560fc7db47b.zip
llvm-429088b9e214b2f39f6063a6b3639560fc7db47b.tar.gz
llvm-429088b9e214b2f39f6063a6b3639560fc7db47b.tar.bz2
Support: Extract fs::resize_file_before_mapping_readwrite from FileOutputBuffer
Add a variant of `fs::resize_file` for use immediately before opening a file with `mapped_file_region::readwrite`. On Windows, `_chsize` (`ftruncate`) is slow, but `CreateFileMapping` (`mmap`) automatically extends the file so the call to `fs::resize_file` can be skipped. This optimization was added to `FileOutputBuffer` in da9bc2e56d5a5c6332a9def1a0065eb399182b93; this commit just extracts the logic out and adds a unit test. Differential Revision: https://reviews.llvm.org/D95490
Diffstat (limited to 'llvm/lib/Support/Signposts.cpp')
0 files changed, 0 insertions, 0 deletions