Silencing some -Wcast-qual warnings. No functional changes intended.

llvm-svn: 211923
This commit is contained in:
Aaron Ballman 2014-06-27 18:25:49 +00:00
parent ec4fb8a59b
commit 172ae5e180

View File

@ -121,7 +121,7 @@ public:
};
ObjectImage *RuntimeDyldMachO::createObjectImage(ObjectBuffer *Buffer) {
uint32_t magic = *((uint32_t *)Buffer->getBufferStart());
uint32_t magic = *((const uint32_t *)Buffer->getBufferStart());
bool is64 = (magic == MachO::MH_MAGIC_64);
assert((magic == MachO::MH_MAGIC_64 || magic == MachO::MH_MAGIC) &&
"Unrecognized Macho Magic");
@ -136,7 +136,7 @@ ObjectImage *RuntimeDyldMachO::createObjectImageFromFile(
MemoryBuffer *Buffer =
MemoryBuffer::getMemBuffer(ObjFile->getData(), "", false);
uint32_t magic = *((uint32_t *)Buffer->getBufferStart());
uint32_t magic = *((const uint32_t *)Buffer->getBufferStart());
bool is64 = (magic == MachO::MH_MAGIC_64);
assert((magic == MachO::MH_MAGIC_64 || magic == MachO::MH_MAGIC) &&
"Unrecognized Macho Magic");