diff options
Diffstat (limited to 'tools/llvm-objdump/MachODump.cpp')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index df96f00bd7..087fb40628 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -158,17 +158,14 @@ getSectionsAndSymbols(const MachO::mach_header Header, SI != SE; ++SI) Symbols.push_back(*SI); - for (section_iterator SI = MachOObj->section_begin(), - SE = MachOObj->section_end(); - SI != SE; ++SI) { - SectionRef SR = *SI; + for (const SectionRef &Section : MachOObj->sections()) { StringRef SectName; - SR.getName(SectName); - Sections.push_back(*SI); + Section.getName(SectName); + Sections.push_back(Section); } MachOObjectFile::LoadCommandInfo Command = - MachOObj->getFirstLoadCommandInfo(); + MachOObj->getFirstLoadCommandInfo(); bool BaseSegmentAddressSet = false; for (unsigned i = 0; ; ++i) { if (Command.C.cmd == MachO::LC_FUNCTION_STARTS) { |