[C++11] Use ObjectFile::sections() in commandline llvm tools

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov
2014-03-13 14:37:36 +00:00
parent b920dfe02b
commit 7a2da95e44
5 changed files with 111 additions and 114 deletions

View File

@ -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) {