From a40b3522c82f5684a8a2c59a631b8c445288f6e1 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 10 Feb 2014 20:24:04 +0000 Subject: Change the begin and end methods in ObjectFile to match the style guide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201108 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-ar/llvm-ar.cpp | 4 ++-- tools/llvm-nm/llvm-nm.cpp | 24 +++++++++++----------- tools/llvm-objdump/COFFDump.cpp | 8 ++++---- tools/llvm-objdump/MachODump.cpp | 12 +++++------ tools/llvm-objdump/llvm-objdump.cpp | 30 +++++++++++++-------------- tools/llvm-readobj/COFFDumper.cpp | 36 ++++++++++++++++----------------- tools/llvm-readobj/MachODumper.cpp | 28 ++++++++++++------------- tools/llvm-size/llvm-size.cpp | 6 +++--- tools/llvm-symbolizer/LLVMSymbolize.cpp | 4 ++-- tools/macho-dump/macho-dump.cpp | 2 +- tools/obj2yaml/coff2yaml.cpp | 12 +++++------ 11 files changed, 83 insertions(+), 83 deletions(-) (limited to 'tools') diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 1a1fd8a483..bc9ad37e5d 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -716,8 +716,8 @@ static void writeSymbolTable( print32BE(Out, 0); } - for (object::symbol_iterator I = Obj->begin_symbols(), - E = Obj->end_symbols(); + for (object::symbol_iterator I = Obj->symbol_begin(), + E = Obj->symbol_end(); I != E; ++I) { uint32_t Symflags = I->getFlags();; if (Symflags & object::SymbolRef::SF_FormatSpecific) diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 3a72862776..fd18454a8f 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -365,7 +365,7 @@ static char getSymbolNMTypeChar(COFFObjectFile &Obj, symbol_iterator I) { uint32_t Characteristics = 0; if (Symb->SectionNumber > 0) { - section_iterator SecI = Obj.end_sections(); + section_iterator SecI = Obj.section_end(); if (error(I->getSection(SecI))) return '?'; const coff_section *Section = Obj.getCOFFSection(SecI); @@ -415,7 +415,7 @@ static char getSymbolNMTypeChar(MachOObjectFile &Obj, symbol_iterator I) { case MachO::N_ABS: return 's'; case MachO::N_SECT: { - section_iterator Sec = Obj.end_sections(); + section_iterator Sec = Obj.section_end(); Obj.getSymbolSection(Symb, Sec); DataRefImpl Ref = Sec->getRawDataRefImpl(); StringRef SectionName; @@ -493,29 +493,29 @@ static char getNMTypeChar(ObjectFile *Obj, symbol_iterator I) { static void getDynamicSymbolIterators(ObjectFile *Obj, symbol_iterator &Begin, symbol_iterator &End) { if (ELF32LEObjectFile *ELF = dyn_cast(Obj)) { - Begin = ELF->begin_dynamic_symbols(); - End = ELF->end_dynamic_symbols(); + Begin = ELF->dynamic_symbol_begin(); + End = ELF->dynamic_symbol_end(); return; } if (ELF64LEObjectFile *ELF = dyn_cast(Obj)) { - Begin = ELF->begin_dynamic_symbols(); - End = ELF->end_dynamic_symbols(); + Begin = ELF->dynamic_symbol_begin(); + End = ELF->dynamic_symbol_end(); return; } if (ELF32BEObjectFile *ELF = dyn_cast(Obj)) { - Begin = ELF->begin_dynamic_symbols(); - End = ELF->end_dynamic_symbols(); + Begin = ELF->dynamic_symbol_begin(); + End = ELF->dynamic_symbol_end(); return; } ELF64BEObjectFile *ELF = cast(Obj); - Begin = ELF->begin_dynamic_symbols(); - End = ELF->end_dynamic_symbols(); + Begin = ELF->dynamic_symbol_begin(); + End = ELF->dynamic_symbol_end(); return; } static void dumpSymbolNamesFromObject(ObjectFile *Obj) { - symbol_iterator IBegin = Obj->begin_symbols(); - symbol_iterator IEnd = Obj->end_symbols(); + symbol_iterator IBegin = Obj->symbol_begin(); + symbol_iterator IEnd = Obj->symbol_end(); if (DynamicSyms) { if (!Obj->isELF()) { error("File format has no dynamic symbol table", Obj->getFileName()); diff --git a/tools/llvm-objdump/COFFDump.cpp b/tools/llvm-objdump/COFFDump.cpp index dd2db2b037..f6f0f15197 100644 --- a/tools/llvm-objdump/COFFDump.cpp +++ b/tools/llvm-objdump/COFFDump.cpp @@ -163,7 +163,7 @@ static error_code resolveSectionAndAddress(const COFFObjectFile *Obj, uint64_t &ResolvedAddr) { if (error_code EC = Sym.getAddress(ResolvedAddr)) return EC; - section_iterator iter(Obj->begin_sections()); + section_iterator iter(Obj->section_begin()); if (error_code EC = Sym.getSection(iter)) return EC; ResolvedSection = Obj->getCOFFSection(iter); @@ -320,7 +320,7 @@ void llvm::printCOFFUnwindInfo(const COFFObjectFile *Obj) { const coff_section *Pdata = 0; - for (section_iterator SI = Obj->begin_sections(), SE = Obj->end_sections(); + for (section_iterator SI = Obj->section_begin(), SE = Obj->section_end(); SI != SE; ++SI) { StringRef Name; if (error(SI->getName(Name))) continue; @@ -329,8 +329,8 @@ void llvm::printCOFFUnwindInfo(const COFFObjectFile *Obj) { Pdata = Obj->getCOFFSection(SI); std::vector Rels; - for (relocation_iterator RI = SI->begin_relocations(), - RE = SI->end_relocations(); + for (relocation_iterator RI = SI->relocation_begin(), + RE = SI->relocation_end(); RI != RE; ++RI) Rels.push_back(*RI); diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index b8ce9c884a..35e424d60b 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -154,13 +154,13 @@ getSectionsAndSymbols(const MachO::mach_header Header, std::vector &Symbols, SmallVectorImpl &FoundFns, uint64_t &BaseSegmentAddress) { - for (symbol_iterator SI = MachOObj->begin_symbols(), - SE = MachOObj->end_symbols(); + for (symbol_iterator SI = MachOObj->symbol_begin(), + SE = MachOObj->symbol_end(); SI != SE; ++SI) Symbols.push_back(*SI); - for (section_iterator SI = MachOObj->begin_sections(), - SE = MachOObj->end_sections(); + for (section_iterator SI = MachOObj->section_begin(), + SE = MachOObj->section_end(); SI != SE; ++SI) { SectionRef SR = *SI; StringRef SectName; @@ -329,8 +329,8 @@ static void DisassembleInputMachO2(StringRef Filename, // Parse relocations. std::vector > Relocs; - for (relocation_iterator RI = Sections[SectIdx].begin_relocations(), - RE = Sections[SectIdx].end_relocations(); + for (relocation_iterator RI = Sections[SectIdx].relocation_begin(), + RE = Sections[SectIdx].relocation_end(); RI != RE; ++RI) { uint64_t RelocOffset, SectionAddress; RI->getOffset(RelocOffset); diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index 4572c96548..3b87507af0 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -386,14 +386,14 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { // in RelocSecs contain the relocations for section S. error_code EC; std::map > SectionRelocMap; - for (section_iterator I = Obj->begin_sections(), E = Obj->end_sections(); + for (section_iterator I = Obj->section_begin(), E = Obj->section_end(); I != E; ++I) { section_iterator Sec2 = I->getRelocatedSection(); - if (Sec2 != Obj->end_sections()) + if (Sec2 != Obj->section_end()) SectionRelocMap[*Sec2].push_back(*I); } - for (section_iterator I = Obj->begin_sections(), E = Obj->end_sections(); + for (section_iterator I = Obj->section_begin(), E = Obj->section_end(); I != E; ++I) { bool Text; if (error(I->isText(Text))) @@ -407,7 +407,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { // Make a list of all the symbols in this section. std::vector > Symbols; - for (symbol_iterator SI = Obj->begin_symbols(), SE = Obj->end_symbols(); + for (symbol_iterator SI = Obj->symbol_begin(), SE = Obj->symbol_end(); SI != SE; ++SI) { bool contains; if (!error(I->containsSymbol(*SI, contains)) && contains) { @@ -435,8 +435,8 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { for (SmallVectorImpl::iterator RelocSec = RelocSecs->begin(), E = RelocSecs->end(); RelocSec != E; ++RelocSec) { - for (relocation_iterator RI = RelocSec->begin_relocations(), - RE = RelocSec->end_relocations(); + for (relocation_iterator RI = RelocSec->relocation_begin(), + RE = RelocSec->relocation_end(); RI != RE; ++RI) Rels.push_back(*RI); } @@ -552,15 +552,15 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { } static void PrintRelocations(const ObjectFile *o) { - for (section_iterator si = o->begin_sections(), se = o->end_sections(); + for (section_iterator si = o->section_begin(), se = o->section_end(); si != se; ++si) { - if (si->begin_relocations() == si->end_relocations()) + if (si->relocation_begin() == si->relocation_end()) continue; StringRef secname; if (error(si->getName(secname))) continue; outs() << "RELOCATION RECORDS FOR [" << secname << "]:\n"; - for (relocation_iterator ri = si->begin_relocations(), - re = si->end_relocations(); + for (relocation_iterator ri = si->relocation_begin(), + re = si->relocation_end(); ri != re; ++ri) { bool hidden; uint64_t address; @@ -581,7 +581,7 @@ static void PrintSectionHeaders(const ObjectFile *o) { outs() << "Sections:\n" "Idx Name Size Address Type\n"; unsigned i = 0; - for (section_iterator si = o->begin_sections(), se = o->end_sections(); + for (section_iterator si = o->section_begin(), se = o->section_end(); si != se; ++si) { StringRef Name; if (error(si->getName(Name))) @@ -604,7 +604,7 @@ static void PrintSectionHeaders(const ObjectFile *o) { static void PrintSectionContents(const ObjectFile *o) { error_code EC; - for (section_iterator si = o->begin_sections(), se = o->end_sections(); + for (section_iterator si = o->section_begin(), se = o->section_end(); si != se; ++si) { StringRef Name; StringRef Contents; @@ -696,14 +696,14 @@ static void PrintSymbolTable(const ObjectFile *o) { if (const COFFObjectFile *coff = dyn_cast(o)) PrintCOFFSymbolTable(coff); else { - for (symbol_iterator si = o->begin_symbols(), se = o->end_symbols(); + for (symbol_iterator si = o->symbol_begin(), se = o->symbol_end(); si != se; ++si) { StringRef Name; uint64_t Address; SymbolRef::Type Type; uint64_t Size; uint32_t Flags = si->getFlags(); - section_iterator Section = o->end_sections(); + section_iterator Section = o->section_end(); if (error(si->getName(Name))) continue; if (error(si->getAddress(Address))) continue; if (error(si->getType(Type))) continue; @@ -743,7 +743,7 @@ static void PrintSymbolTable(const ObjectFile *o) { << ' '; if (Absolute) outs() << "*ABS*"; - else if (Section == o->end_sections()) + else if (Section == o->section_end()) outs() << "*UND*"; else { if (const MachOObjectFile *MachO = diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp index 08153ebd04..120794280d 100644 --- a/tools/llvm-readobj/COFFDumper.cpp +++ b/tools/llvm-readobj/COFFDumper.cpp @@ -185,7 +185,7 @@ static error_code resolveSectionAndAddress(const COFFObjectFile *Obj, if (error_code EC = Sym.getAddress(ResolvedAddr)) return EC; - section_iterator iter(Obj->begin_sections()); + section_iterator iter(Obj->section_begin()); if (error_code EC = Sym.getSection(iter)) return EC; @@ -541,13 +541,13 @@ error_code COFFDumper::getSection( } void COFFDumper::cacheRelocations() { - for (section_iterator SecI = Obj->begin_sections(), - SecE = Obj->end_sections(); + for (section_iterator SecI = Obj->section_begin(), + SecE = Obj->section_end(); SecI != SecE; ++SecI) { const coff_section *Section = Obj->getCOFFSection(SecI); - for (relocation_iterator RelI = SecI->begin_relocations(), - RelE = SecI->end_relocations(); + for (relocation_iterator RelI = SecI->relocation_begin(), + RelE = SecI->relocation_end(); RelI != RelE; ++RelI) RelocMap[Section].push_back(*RelI); @@ -818,8 +818,8 @@ void COFFDumper::printCodeViewLineTables(section_iterator SecI) { void COFFDumper::printSections() { ListScope SectionsD(W, "Sections"); int SectionNumber = 0; - for (section_iterator SecI = Obj->begin_sections(), - SecE = Obj->end_sections(); + for (section_iterator SecI = Obj->section_begin(), + SecE = Obj->section_end(); SecI != SecE; ++SecI) { ++SectionNumber; const coff_section *Section = Obj->getCOFFSection(SecI); @@ -845,16 +845,16 @@ void COFFDumper::printSections() { if (opts::SectionRelocations) { ListScope D(W, "Relocations"); - for (relocation_iterator RelI = SecI->begin_relocations(), - RelE = SecI->end_relocations(); + for (relocation_iterator RelI = SecI->relocation_begin(), + RelE = SecI->relocation_end(); RelI != RelE; ++RelI) printRelocation(SecI, RelI); } if (opts::SectionSymbols) { ListScope D(W, "Symbols"); - for (symbol_iterator SymI = Obj->begin_symbols(), - SymE = Obj->end_symbols(); + for (symbol_iterator SymI = Obj->symbol_begin(), + SymE = Obj->symbol_end(); SymI != SymE; ++SymI) { bool Contained = false; if (SecI->containsSymbol(*SymI, Contained) || !Contained) @@ -880,8 +880,8 @@ void COFFDumper::printRelocations() { ListScope D(W, "Relocations"); int SectionNumber = 0; - for (section_iterator SecI = Obj->begin_sections(), - SecE = Obj->end_sections(); + for (section_iterator SecI = Obj->section_begin(), + SecE = Obj->section_end(); SecI != SecE; ++SecI) { ++SectionNumber; StringRef Name; @@ -889,8 +889,8 @@ void COFFDumper::printRelocations() { continue; bool PrintedGroup = false; - for (relocation_iterator RelI = SecI->begin_relocations(), - RelE = SecI->end_relocations(); + for (relocation_iterator RelI = SecI->relocation_begin(), + RelE = SecI->relocation_end(); RelI != RelE; ++RelI) { if (!PrintedGroup) { W.startLine() << "Section (" << SectionNumber << ") " << Name << " {\n"; @@ -939,7 +939,7 @@ void COFFDumper::printRelocation(section_iterator SecI, void COFFDumper::printSymbols() { ListScope Group(W, "Symbols"); - for (symbol_iterator SymI = Obj->begin_symbols(), SymE = Obj->end_symbols(); + for (symbol_iterator SymI = Obj->symbol_begin(), SymE = Obj->symbol_end(); SymI != SymE; ++SymI) printSymbol(SymI); } @@ -1087,8 +1087,8 @@ void COFFDumper::printUnwindInfo() { } void COFFDumper::printX64UnwindInfo() { - for (section_iterator SecI = Obj->begin_sections(), - SecE = Obj->end_sections(); + for (section_iterator SecI = Obj->section_begin(), + SecE = Obj->section_end(); SecI != SecE; ++SecI) { StringRef Name; if (error(SecI->getName(Name))) diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp index af76901a3f..ef699b30bf 100644 --- a/tools/llvm-readobj/MachODumper.cpp +++ b/tools/llvm-readobj/MachODumper.cpp @@ -222,8 +222,8 @@ void MachODumper::printSections(const MachOObjectFile *Obj) { ListScope Group(W, "Sections"); int SectionIndex = -1; - for (section_iterator SecI = Obj->begin_sections(), - SecE = Obj->end_sections(); + for (section_iterator SecI = Obj->section_begin(), + SecE = Obj->section_end(); SecI != SecE; ++SecI) { ++SectionIndex; @@ -258,16 +258,16 @@ void MachODumper::printSections(const MachOObjectFile *Obj) { if (opts::SectionRelocations) { ListScope D(W, "Relocations"); - for (relocation_iterator RelI = SecI->begin_relocations(), - RelE = SecI->end_relocations(); + for (relocation_iterator RelI = SecI->relocation_begin(), + RelE = SecI->relocation_end(); RelI != RelE; ++RelI) printRelocation(SecI, RelI); } if (opts::SectionSymbols) { ListScope D(W, "Symbols"); - for (symbol_iterator SymI = Obj->begin_symbols(), - SymE = Obj->end_symbols(); + for (symbol_iterator SymI = Obj->symbol_begin(), + SymE = Obj->symbol_end(); SymI != SymE; ++SymI) { bool Contained = false; if (SecI->containsSymbol(*SymI, Contained) || !Contained) @@ -290,16 +290,16 @@ void MachODumper::printRelocations() { ListScope D(W, "Relocations"); error_code EC; - for (section_iterator SecI = Obj->begin_sections(), - SecE = Obj->end_sections(); + for (section_iterator SecI = Obj->section_begin(), + SecE = Obj->section_end(); SecI != SecE; ++SecI) { StringRef Name; if (error(SecI->getName(Name))) continue; bool PrintedGroup = false; - for (relocation_iterator RelI = SecI->begin_relocations(), - RelE = SecI->end_relocations(); + for (relocation_iterator RelI = SecI->relocation_begin(), + RelE = SecI->relocation_end(); RelI != RelE; ++RelI) { if (!PrintedGroup) { W.startLine() << "Section " << Name << " {\n"; @@ -331,7 +331,7 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj, if (error(RelI->getOffset(Offset))) return; if (error(RelI->getTypeName(RelocName))) return; symbol_iterator Symbol = RelI->getSymbol(); - if (Symbol != Obj->end_symbols() && + if (Symbol != Obj->symbol_end() && error(Symbol->getName(SymbolName))) return; @@ -370,7 +370,7 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj, void MachODumper::printSymbols() { ListScope Group(W, "Symbols"); - for (symbol_iterator SymI = Obj->begin_symbols(), SymE = Obj->end_symbols(); + for (symbol_iterator SymI = Obj->symbol_begin(), SymE = Obj->symbol_end(); SymI != SymE; ++SymI) { printSymbol(SymI); } @@ -389,9 +389,9 @@ void MachODumper::printSymbol(symbol_iterator SymI) { getSymbol(Obj, SymI->getRawDataRefImpl(), Symbol); StringRef SectionName = ""; - section_iterator SecI(Obj->end_sections()); + section_iterator SecI(Obj->section_begin()); if (!error(SymI->getSection(SecI)) && - SecI != Obj->end_sections()) + SecI != Obj->section_end()) error(SecI->getName(SectionName)); DictScope D(W, "Symbol"); diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp index f46bf6b4a2..c2d2446275 100644 --- a/tools/llvm-size/llvm-size.cpp +++ b/tools/llvm-size/llvm-size.cpp @@ -111,7 +111,7 @@ static void PrintObjectSectionSizes(ObjectFile *o) { std::size_t max_name_len = strlen("section"); std::size_t max_size_len = strlen("size"); std::size_t max_addr_len = strlen("addr"); - for (section_iterator i = o->begin_sections(), e = o->end_sections(); + for (section_iterator i = o->section_begin(), e = o->section_end(); i != e; ++i) { uint64_t size = 0; if (error(i->getSize(size))) @@ -150,7 +150,7 @@ static void PrintObjectSectionSizes(ObjectFile *o) { << "%#" << max_addr_len << radix_fmt << "\n"; // Print each section. - for (section_iterator i = o->begin_sections(), e = o->end_sections(); + for (section_iterator i = o->section_begin(), e = o->section_end(); i != e; ++i) { StringRef name; uint64_t size = 0; @@ -181,7 +181,7 @@ static void PrintObjectSectionSizes(ObjectFile *o) { uint64_t total_bss = 0; // Make one pass over the section table to calculate sizes. - for (section_iterator i = o->begin_sections(), e = o->end_sections(); + for (section_iterator i = o->section_begin(), e = o->section_end(); i != e; ++i) { uint64_t size = 0; bool isText = false; diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp index 4075199857..9f329a6de6 100644 --- a/tools/llvm-symbolizer/LLVMSymbolize.cpp +++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp @@ -52,7 +52,7 @@ static void patchFunctionNameInDILineInfo(const std::string &NewFunctionName, ModuleInfo::ModuleInfo(ObjectFile *Obj, DIContext *DICtx) : Module(Obj), DebugInfoContext(DICtx) { - for (symbol_iterator si = Module->begin_symbols(), se = Module->end_symbols(); + for (symbol_iterator si = Module->symbol_begin(), se = Module->symbol_end(); si != se; ++si) { SymbolRef::Type SymbolType; if (error(si->getType(SymbolType))) @@ -265,7 +265,7 @@ static bool getGNUDebuglinkContents(const Binary *Bin, std::string &DebugName, const ObjectFile *Obj = dyn_cast(Bin); if (!Obj) return false; - for (section_iterator I = Obj->begin_sections(), E = Obj->end_sections(); + for (section_iterator I = Obj->section_begin(), E = Obj->section_end(); I != E; ++I) { StringRef Name; I->getName(Name); diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp index f2f4b8c70f..dbb2700b77 100644 --- a/tools/macho-dump/macho-dump.cpp +++ b/tools/macho-dump/macho-dump.cpp @@ -202,7 +202,7 @@ static int DumpSymtabCommand(const MachOObjectFile &Obj) { // Dump the symbol table. outs() << " ('_symbols', [\n"; unsigned SymNum = 0; - for (symbol_iterator I = Obj.begin_symbols(), E = Obj.end_symbols(); I != E; + for (symbol_iterator I = Obj.symbol_begin(), E = Obj.symbol_end(); I != E; ++I, ++SymNum) { DataRefImpl DRI = I->getRawDataRefImpl(); if (Obj.is64Bit()) { diff --git a/tools/obj2yaml/coff2yaml.cpp b/tools/obj2yaml/coff2yaml.cpp index 47ccfb7700..8fdd4aee0c 100644 --- a/tools/obj2yaml/coff2yaml.cpp +++ b/tools/obj2yaml/coff2yaml.cpp @@ -51,8 +51,8 @@ void COFFDumper::dumpHeader(const object::coff_file_header *Header) { void COFFDumper::dumpSections(unsigned NumSections) { std::vector &Sections = YAMLObj.Sections; - for (object::section_iterator iter = Obj.begin_sections(); - iter != Obj.end_sections(); ++iter) { + for (object::section_iterator iter = Obj.section_begin(); + iter != Obj.section_end(); ++iter) { const object::coff_section *Sect = Obj.getCOFFSection(iter); COFFYAML::Section Sec; Sec.Name = Sect->Name; // FIXME: check the null termination! @@ -65,8 +65,8 @@ void COFFDumper::dumpSections(unsigned NumSections) { Sec.SectionData = object::yaml::BinaryRef(sectionData); std::vector Relocations; - for (object::relocation_iterator rIter = iter->begin_relocations(); - rIter != iter->end_relocations(); ++rIter) { + for (object::relocation_iterator rIter = iter->relocation_begin(); + rIter != iter->relocation_end(); ++rIter) { const object::coff_relocation *reloc = Obj.getCOFFRelocation(rIter); COFFYAML::Relocation Rel; object::symbol_iterator Sym = rIter->getSymbol(); @@ -82,8 +82,8 @@ void COFFDumper::dumpSections(unsigned NumSections) { void COFFDumper::dumpSymbols(unsigned NumSymbols) { std::vector &Symbols = YAMLObj.Symbols; - for (object::symbol_iterator iter = Obj.begin_symbols(); - iter != Obj.end_symbols(); ++iter) { + for (object::symbol_iterator iter = Obj.symbol_begin(); + iter != Obj.symbol_end(); ++iter) { const object::coff_symbol *Symbol = Obj.getCOFFSymbol(iter); COFFYAML::Symbol Sym; Obj.getSymbolName(Symbol, Sym.Name); -- cgit v1.2.3