summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj
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-readobj
parent700bba297ba8a99c5dfd31ceaa894fbd1496a03e (diff)
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-readobj')
-rw-r--r--tools/llvm-readobj/COFFDumper.cpp36
-rw-r--r--tools/llvm-readobj/MachODumper.cpp28
2 files changed, 32 insertions, 32 deletions
diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp
index 08153ebd047..120794280d2 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 af76901a3f1..ef699b30bf7 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");