summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Path.inc
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2019-07-26 05:17:14 +0000
committerYi Kong <yikong@google.com>2019-07-26 05:17:14 +0000
commit1755abe1fb5c70b49526c029dde65f324a62d319 (patch)
tree952d333c1835a5d3dd8806f5123c9984648a350a /llvm/lib/Support/Unix/Path.inc
parent4e794a8bae0077352f154f8902d43fe71f4e34cb (diff)
downloadbcm5719-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.inc2
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))
OpenPOWER on IntegriCloud