commit | e8c5427cd12d1c87e1a7af4bf0fa245f40ceb198 | [log] [tgz] |
---|---|---|
author | Adrian Prantl <aprantl@apple.com> | Thu Apr 18 21:22:50 2019 +0000 |
committer | Adrian Prantl <aprantl@apple.com> | Thu Apr 18 21:22:50 2019 +0000 |
tree | e99243c753cd4437ce1182ad44b3bf61e21a30af | |
parent | f3a030510b2554fa6657e32fd35aae8ddbb142b4 [diff] |
Implement sys::fs::copy_file using the macOS copyfile(3) API to support APFS clones. This patch adds a Darwin-specific implementation of llvm::sys::fs::copy_file() that uses the macOS copyfile(3) API to support APFS copy-on-write clones, which should be faster and much more space efficient. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/ToolsandAPIs/ToolsandAPIs.html Differential Revision: https://reviews.llvm.org/D60802 This reapplies 358628 with an additional bugfix handling the case where the destination file already exists. (Caught by the clang testsuite). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358716 91177308-0d34-0410-b5e6-96231b3b80d8