Attempt to fix llvm-readobj crash on ppc64 due to r289674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Yaxun Liu 2016-12-15 06:59:23 +00:00
parent a7bd1c6059
commit 4ebefd4b3e

View File

@ -2350,7 +2350,7 @@ template <class ELFT> void ELFDumper<ELFT>::printAMDGPURuntimeMD() {
ArrayRef<uint8_t> Sec = unwrapOrError(Obj->getSectionContents(Shdr));
const uint32_t RuntimeMDNoteType = 7;
for (auto I = reinterpret_cast<const uint32_t *>(&Sec[0]),
for (auto I = reinterpret_cast<const Elf_Word *>(&Sec[0]),
E = I + Sec.size()/4; I != E;) {
uint32_t NameSZ = I[0];
uint32_t DescSZ = I[1];