[C++11] Introduce ObjectFile::sections().
authorAlexey Samsonov <samsonov@google.com>
Thu, 13 Mar 2014 13:52:54 +0000 (13:52 +0000)
committerAlexey Samsonov <samsonov@google.com>
Thu, 13 Mar 2014 13:52:54 +0000 (13:52 +0000)
commitb920dfe02b4fb88bafa64ab85800c00faba47f5d
treea65cfaf7f9f3c04d04f8cf33f842fc683daae575
parentf8909fa1406eba023f9fadfa7e8182630d3ea14a
[C++11] Introduce ObjectFile::sections().

Summary:
This adds ObjectFile::section_iterator_range, that allows to write
range-based for-loops running over all sections of a given file.
Several files from lib/ are converted to the new interface. Similar fixes
should be applied to a variety of llvm-* tools.

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3069

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203799 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ObjectFile.h
lib/DebugInfo/DWARFContext.cpp
lib/MC/MCObjectDisassembler.cpp
lib/MC/MCObjectSymbolizer.cpp
lib/Object/MachOObjectFile.cpp