mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
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:
@ -45,7 +45,7 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr,
|
|||||||
|
|
||||||
# if (defined(__POWERPC__) || defined (__ppc__) || \
|
# if (defined(__POWERPC__) || defined (__ppc__) || \
|
||||||
defined(_POWER) || defined(_ARCH_PPC)) || defined(__arm__)
|
defined(_POWER) || defined(_ARCH_PPC)) || defined(__arm__)
|
||||||
sys_icache_invalidate(Addr, Len);
|
sys_icache_invalidate(const_cast<void *>(Addr), Len);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -67,11 +67,12 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr,
|
|||||||
asm volatile("isync");
|
asm volatile("isync");
|
||||||
# elif defined(__arm__) && defined(__GNUC__)
|
# elif defined(__arm__) && defined(__GNUC__)
|
||||||
// FIXME: Can we safely always call this for __GNUC__ everywhere?
|
// FIXME: Can we safely always call this for __GNUC__ everywhere?
|
||||||
char *Start = (char*) Addr;
|
const char *Start = static_cast<const char *>(Addr);
|
||||||
char *End = Start + Len;
|
const char *End = Start + Len;
|
||||||
__clear_cache(Start, End);
|
__clear_cache(const_cast<char *>(Start), const_cast<char *>(End));
|
||||||
# elif defined(__mips__)
|
# 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
|
||||||
|
|
||||||
#endif // end apple
|
#endif // end apple
|
||||||
|
@ -884,7 +884,8 @@ const char *Path::MapInFilePages(int FD, size_t FileSize, off_t Offset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Path::UnMapFilePages(const char *BasePtr, size_t FileSize) {
|
void Path::UnMapFilePages(const char *BasePtr, size_t FileSize) {
|
||||||
::munmap((void*)BasePtr, FileSize);
|
const void *Addr = static_cast<const void *>(BasePtr);
|
||||||
|
::munmap(const_cast<void *>(Addr), FileSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
@ -528,7 +528,8 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) {
|
|||||||
} else {
|
} else {
|
||||||
// Use ::writev() where available.
|
// Use ::writev() where available.
|
||||||
#if defined(HAVE_WRITEV)
|
#if defined(HAVE_WRITEV)
|
||||||
struct iovec IOV = { (void*) Ptr, Size };
|
const void *Addr = static_cast<const void *>(Ptr);
|
||||||
|
struct iovec IOV = {const_cast<void *>(Addr), Size };
|
||||||
ret = ::writev(FD, &IOV, 1);
|
ret = ::writev(FD, &IOV, 1);
|
||||||
#else
|
#else
|
||||||
ret = ::write(FD, Ptr, Size);
|
ret = ::write(FD, Ptr, Size);
|
||||||
|
Reference in New Issue
Block a user