git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360174
91177308-0d34-0410-b5e6-
96231b3b80d8
/// implementation.
std::error_code copy_file(const Twine &From, const Twine &To) {
uint32_t Flag = COPYFILE_DATA;
+#if __has_builtin(__builtin_available)
if (__builtin_available(macos 10.12, *)) {
bool IsSymlink;
if (std::error_code Error = is_symlink_file(From, IsSymlink))
if (!IsSymlink && !exists(To))
Flag = COPYFILE_CLONE;
}
-
+#endif
int Status =
copyfile(From.str().c_str(), To.str().c_str(), /* State */ NULL, Flag);