Fixed few warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Galina Kistanova
2012-07-12 20:45:36 +00:00
parent feae00a68e
commit d897599e5b
3 changed files with 10 additions and 7 deletions

View File

@ -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<void *>(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<const char *>(Addr);
const char *End = Start + Len;
__clear_cache(const_cast<char *>(Start), const_cast<char *>(End));
# elif defined(__mips__)
cacheflush((char*)Addr, Len, BCACHE);
const char *Start = static_cast<const char *>(Addr);
cacheflush(const_cast<char *>(Start), Len, BCACHE);
# endif
#endif // end apple