From 111b0b6da4a9cc8f33075b4a5237eeeda872e710 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Sun, 19 May 2013 20:33:51 +0000 Subject: [PATCH] Remove declaration of __clear_cache for __APPLE__. 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 --- llvm/lib/Support/Unix/Memory.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc index 1c6af7fa0f2f..58fda420eb62 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 { -- GitLab