[llvm] r182223 - Remove declaration of __clear_cache for __APPLE__. <rdar://problem/13924072>

Bob Wilson bob.wilson at apple.com
Sun May 19 13:33:51 PDT 2013


Author: bwilson
Date: Sun May 19 15:33:51 2013
New Revision: 182223

URL: http://llvm.org/viewvc/llvm-project?rev=182223&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Support/Unix/Memory.inc

Modified: llvm/trunk/lib/Support/Unix/Memory.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Memory.inc?rev=182223&r1=182222&r2=182223&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Memory.inc (original)
+++ llvm/trunk/lib/Support/Unix/Memory.inc Sun May 19 15:33:51 2013
@@ -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 {
 





More information about the llvm-commits mailing list