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.
(I recently started using copy_file in dsymutil: https://reviews.llvm.org/D60642)