summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-05-19 20:33:51 +0000
committerBob Wilson <bob.wilson@apple.com>2013-05-19 20:33:51 +0000
commit111b0b6da4a9cc8f33075b4a5237eeeda872e710 (patch)
tree2537a0aa288f3dcc74218d3aa5415747775cfbdb /llvm/lib/Support/Unix
parent7ca944b9dbcb1f804dad46e2ad02ec60c523b12e (diff)
downloadbcm5719-llvm-111b0b6da4a9cc8f33075b4a5237eeeda872e710.tar.gz
bcm5719-llvm-111b0b6da4a9cc8f33075b4a5237eeeda872e710.zip
Remove declaration of __clear_cache for __APPLE__. <rdar://problem/13924072>
This fixes a bootstrapping problem with builds for Apple ARM targets. Clang had the wrong prototype for __clear_cache with ARM targets. Rafael fixed that in clang svn r181784 and r181810, but without those changes, we can't build this code for ARM because clang reports an error about the declaration in Memory.inc not matching the builtin declaration. Some of our buildbots need to use an older compiler that doesn't have the clang fix. Since __clear_cache is never used here when __APPLE__ is defined, I'm just conditionalizing the declaration to match that. I also moved the declaration of sys_icache_invalidate inside the conditional for __APPLE__ while I was at it. llvm-svn: 182223
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Memory.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc
index 1c6af7fa0f2..58fda420eb6 100644
--- a/llvm/lib/Support/Unix/Memory.inc
+++ b/llvm/lib/Support/Unix/Memory.inc
@@ -32,8 +32,11 @@
# endif
#endif
+#ifdef __APPLE__
extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
+#else
extern "C" void __clear_cache(void *, void*);
+#endif
namespace {
OpenPOWER on IntegriCloud