diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-10-21 11:01:41 -0700 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-10-29 16:48:35 -0700 |
| commit | 0d5b6423bac61efd8aaedaa7b65b462d2f08c661 (patch) | |
| tree | 4421b2f357b7722c523a9b4be1881e0fc2b6c6ff /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 80405df30749d9d2002d84bb312ae38edf19a7bf (diff) | |
Support: Reduce stats in fs::copy_file on Darwin
fs::copy_file() on Darwin has a nice optimization to clone the file when
possible. Change the implementation to use clonefile() directly, instead
of the higher-level copyfile(). The latter does the wrong thing for
symlinks, which requires calling `stat` first...
With that out of the way, optimistically call clonefile() all the time,
and then for any error that's recoverable try again with copyfile()
(without the COPYFILE_CLONE flag, as before).
Differential Revision: https://reviews.llvm.org/D112250
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
