From 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 15 Aug 2012 19:34:23 +0000 Subject: Vendor import of llvm trunk r161861: http://llvm.org/svn/llvm-project/llvm/trunk@161861 --- lib/Support/Memory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/Support/Memory.cpp') diff --git a/lib/Support/Memory.cpp b/lib/Support/Memory.cpp index 2a1642a..22f7494 100644 --- a/lib/Support/Memory.cpp +++ b/lib/Support/Memory.cpp @@ -45,7 +45,7 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr, # if (defined(__POWERPC__) || defined (__ppc__) || \ defined(_POWER) || defined(_ARCH_PPC)) || defined(__arm__) - sys_icache_invalidate(Addr, Len); + sys_icache_invalidate(const_cast(Addr), Len); # endif #else @@ -67,11 +67,12 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr, asm volatile("isync"); # elif defined(__arm__) && defined(__GNUC__) // FIXME: Can we safely always call this for __GNUC__ everywhere? - char *Start = (char*) Addr; - char *End = Start + Len; - __clear_cache(Start, End); + const char *Start = static_cast(Addr); + const char *End = Start + Len; + __clear_cache(const_cast(Start), const_cast(End)); # elif defined(__mips__) - cacheflush((char*)Addr, Len, BCACHE); + const char *Start = static_cast(Addr); + cacheflush(const_cast(Start), Len, BCACHE); # endif #endif // end apple -- cgit v1.1