summaryrefslogtreecommitdiff
path: root/tools/llvm-objdump
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-02-10 20:24:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-02-10 20:24:04 +0000
commita40b3522c82f5684a8a2c59a631b8c445288f6e1 (patch)
tree86bbfc7434be05fc970615da9f80a810b100c9d8 /tools/llvm-objdump
parent700bba297ba8a99c5dfd31ceaa894fbd1496a03e (diff)
downloadllvm-a40b3522c82f5684a8a2c59a631b8c445288f6e1.tar.gz
llvm-a40b3522c82f5684a8a2c59a631b8c445288f6e1.tar.bz2
llvm-a40b3522c82f5684a8a2c59a631b8c445288f6e1.tar.xz
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
Diffstat (limited to 'tools/llvm-objdump')
-rw-r--r--tools/llvm-objdump/COFFDump.cpp8
-rw-r--r--tools/llvm-objdump/MachODump.cpp12
-rw-r--r--tools/llvm-objdump/llvm-objdump.cpp30
3 files changed, 25 insertions, 25 deletions
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<RelocationRef> 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<SymbolRef> &Symbols,
SmallVectorImpl<uint64_t> &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<std::pair<uint64_t, SymbolRef> > 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<SectionRef, SmallVector<SectionRef, 1> > 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<std::pair<uint64_t, StringRef> > 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<SectionRef>::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<const COFFObjectFile>(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 =