From 6d69684c084a7abf5fa21aaef9f74c0785ec7724 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 14 Aug 2014 13:53:19 +0000 Subject: [PATCH] Silencing some -Wcast-qual warnings and removing some C-style casts at the same time. NFC. llvm-svn: 215643 --- tools/llvm-objdump/MachODump.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index bd4b6cb5719..e6c505d1b3b 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -710,7 +710,8 @@ static void printCompressedSecondLevelUnwindPage( uint16_t EncodingsStart = readNext(Pos); readNext(Pos); - auto PageEncodings = (support::ulittle32_t *)(PageStart + EncodingsStart); + const auto *PageEncodings = reinterpret_cast( + PageStart + EncodingsStart); Pos = PageStart + EntriesStart; for (unsigned i = 0; i < NumEntries; ++i) { @@ -891,7 +892,7 @@ printMachOUnwindInfoSection(const MachOObjectFile *Obj, << format("0x%08" PRIx32, IndexEntries[i].FunctionOffset) << '\n'; Pos = Contents.data() + IndexEntries[i].SecondLevelPageStart; - uint32_t Kind = *(support::ulittle32_t *)Pos; + uint32_t Kind = *reinterpret_cast(Pos); if (Kind == 2) printRegularSecondLevelUnwindPage(Pos); else if (Kind == 3)