[llvm] r181785 - Declare __clear_cache.

Matt Beaumont-Gay matthewbg at google.com
Tue May 14 09:22:22 PDT 2013


On Tue, May 14, 2013 at 6:02 AM, Rafael Espindola
<rafael.espindola at gmail.com> wrote:
> Author: rafael
> Date: Tue May 14 08:02:37 2013
> New Revision: 181785
>
> URL: http://llvm.org/viewvc/llvm-project?rev=181785&view=rev
> Log:
> Declare __clear_cache.
>
> GCC declares __clear_cache in the gnu modes (-std=gnu++98,
> -std=gnu++11), but not in the strict modes (-std=c++98, -std=c++11). This patch
> declares it and therefore fixes the build when using one of the strict modes.
>
> 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=181785&r1=181784&r2=181785&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/Unix/Memory.inc (original)
> +++ llvm/trunk/lib/Support/Unix/Memory.inc Tue May 14 08:02:37 2013
> @@ -33,6 +33,7 @@
>  #endif
>
>  extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
> +extern "C" void __clear_cache(char *, char*);

With gcc 4.7:

lib/Support/Unix/Memory.inc:36:44: error: new declaration 'void
__clear_cache(char*, char*)' [-Werror]
lib/Support/Unix/Memory.inc:36:44: error: ambiguates built-in
declaration 'void __clear_cache(void*, void*)' [-Werror]



More information about the llvm-commits mailing list