diff options
author | Yi Kong <yikong@google.com> | 2019-07-26 05:17:14 +0000 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2019-07-26 05:17:14 +0000 |
commit | 1755abe1fb5c70b49526c029dde65f324a62d319 (patch) | |
tree | 952d333c1835a5d3dd8806f5123c9984648a350a /llvm/lib/Support/Unix/Path.inc | |
parent | 4e794a8bae0077352f154f8902d43fe71f4e34cb (diff) | |
download | bcm5719-llvm-1755abe1fb5c70b49526c029dde65f324a62d319.tar.gz bcm5719-llvm-1755abe1fb5c70b49526c029dde65f324a62d319.zip |
Fix macOS build after r358716
COPYFILE_CLONE is only defined on newer macOS versions, using it without
check breaks build on systems running legacy OS and toolchain.
Differential Revision: https://reviews.llvm.org/D65317
llvm-svn: 367084
Diffstat (limited to 'llvm/lib/Support/Unix/Path.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 908f43ed5a9..5c2c061fb88 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -1203,7 +1203,7 @@ namespace fs { /// implementation. std::error_code copy_file(const Twine &From, const Twine &To) { uint32_t Flag = COPYFILE_DATA; -#if __has_builtin(__builtin_available) +#if __has_builtin(__builtin_available) && defined(COPYFILE_CLONE) if (__builtin_available(macos 10.12, *)) { bool IsSymlink; if (std::error_code Error = is_symlink_file(From, IsSymlink)) |