mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
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
This commit is contained in:
@ -52,7 +52,7 @@ MCMachObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
|
||||
: MCObjectSymbolizer(Ctx, RelInfo, MOOF), MOOF(MOOF),
|
||||
StubsStart(0), StubsCount(0), StubSize(0), StubsIndSymIndex(0) {
|
||||
|
||||
for (section_iterator SI = MOOF->begin_sections(), SE = MOOF->end_sections();
|
||||
for (section_iterator SI = MOOF->section_begin(), SE = MOOF->section_end();
|
||||
SI != SE; ++SI) {
|
||||
StringRef Name; SI->getName(Name);
|
||||
if (Name == "__stubs") {
|
||||
@ -88,11 +88,11 @@ StringRef MCMachObjectSymbolizer::findExternalFunctionAt(uint64_t Addr) {
|
||||
MOOF->getIndirectSymbolTableEntry(MOOF->getDysymtabLoadCommand(), StubIdx);
|
||||
|
||||
StringRef SymName;
|
||||
symbol_iterator SI = MOOF->begin_symbols();
|
||||
symbol_iterator SI = MOOF->symbol_begin();
|
||||
for (uint32_t i = 0; i != SymtabIdx; ++i)
|
||||
++SI;
|
||||
SI->getName(SymName);
|
||||
assert(SI != MOOF->end_symbols() && "Stub wasn't found in the symbol table!");
|
||||
assert(SI != MOOF->symbol_end() && "Stub wasn't found in the symbol table!");
|
||||
assert(SymName.front() == '_' && "Mach-O symbol doesn't start with '_'!");
|
||||
return SymName.substr(1);
|
||||
}
|
||||
@ -155,7 +155,7 @@ tryAddingSymbolicOperand(MCInst &MI, raw_ostream &cStream,
|
||||
return false;
|
||||
uint64_t UValue = Value;
|
||||
// FIXME: map instead of looping each time?
|
||||
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) {
|
||||
uint64_t SymAddr; SI->getAddress(SymAddr);
|
||||
uint64_t SymSize; SI->getSize(SymSize);
|
||||
@ -233,7 +233,7 @@ const RelocationRef *MCObjectSymbolizer::findRelocationAt(uint64_t Addr) {
|
||||
}
|
||||
|
||||
void MCObjectSymbolizer::buildSectionList() {
|
||||
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) {
|
||||
bool RequiredForExec; SI->isRequiredForExecution(RequiredForExec);
|
||||
if (RequiredForExec == false)
|
||||
@ -254,10 +254,10 @@ void MCObjectSymbolizer::buildSectionList() {
|
||||
}
|
||||
|
||||
void MCObjectSymbolizer::buildRelocationByAddrMap() {
|
||||
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) {
|
||||
section_iterator RelSecI = SI->getRelocatedSection();
|
||||
if (RelSecI == Obj->end_sections())
|
||||
if (RelSecI == Obj->section_end())
|
||||
continue;
|
||||
|
||||
uint64_t StartAddr; RelSecI->getAddress(StartAddr);
|
||||
@ -265,8 +265,8 @@ void MCObjectSymbolizer::buildRelocationByAddrMap() {
|
||||
bool RequiredForExec; RelSecI->isRequiredForExecution(RequiredForExec);
|
||||
if (RequiredForExec == false || Size == 0)
|
||||
continue;
|
||||
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) {
|
||||
// FIXME: libObject is inconsistent regarding error handling. The
|
||||
// overwhelming majority of methods always return object_error::success,
|
||||
|
Reference in New Issue
Block a user