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 --- include/llvm/Object/COFF.h | 12 +++++------ include/llvm/Object/ELFObjectFile.h | 40 ++++++++++++++++++------------------- include/llvm/Object/MachO.h | 12 +++++------ include/llvm/Object/ObjectFile.h | 20 +++++++++---------- 4 files changed, 42 insertions(+), 42 deletions(-) (limited to 'include') diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index 5d99508f57..264a851e85 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -332,12 +332,12 @@ protected: public: COFFObjectFile(MemoryBuffer *Object, error_code &EC, bool BufferOwned = true); - symbol_iterator begin_symbols() const LLVM_OVERRIDE; - symbol_iterator end_symbols() const LLVM_OVERRIDE; - library_iterator begin_libraries_needed() const LLVM_OVERRIDE; - library_iterator end_libraries_needed() const LLVM_OVERRIDE; - section_iterator begin_sections() const LLVM_OVERRIDE; - section_iterator end_sections() const LLVM_OVERRIDE; + symbol_iterator symbol_begin() const LLVM_OVERRIDE; + symbol_iterator symbol_end() const LLVM_OVERRIDE; + library_iterator needed_library_begin() const LLVM_OVERRIDE; + library_iterator needed_library_end() const LLVM_OVERRIDE; + section_iterator section_begin() const LLVM_OVERRIDE; + section_iterator section_end() const LLVM_OVERRIDE; const coff_section *getCOFFSection(section_iterator &It) const; const coff_symbol *getCOFFSymbol(symbol_iterator &It) const; diff --git a/include/llvm/Object/ELFObjectFile.h b/include/llvm/Object/ELFObjectFile.h index fe63277830..054d8d4b65 100644 --- a/include/llvm/Object/ELFObjectFile.h +++ b/include/llvm/Object/ELFObjectFile.h @@ -180,17 +180,17 @@ public: const Elf_Sym *getSymbol(DataRefImpl Symb) const; - symbol_iterator begin_symbols() const LLVM_OVERRIDE; - symbol_iterator end_symbols() const LLVM_OVERRIDE; + symbol_iterator symbol_begin() const LLVM_OVERRIDE; + symbol_iterator symbol_end() const LLVM_OVERRIDE; - symbol_iterator begin_dynamic_symbols() const; - symbol_iterator end_dynamic_symbols() const; + symbol_iterator dynamic_symbol_begin() const; + symbol_iterator dynamic_symbol_end() const; - section_iterator begin_sections() const LLVM_OVERRIDE; - section_iterator end_sections() const LLVM_OVERRIDE; + section_iterator section_begin() const LLVM_OVERRIDE; + section_iterator section_end() const LLVM_OVERRIDE; - library_iterator begin_libraries_needed() const LLVM_OVERRIDE; - library_iterator end_libraries_needed() const LLVM_OVERRIDE; + library_iterator needed_library_begin() const LLVM_OVERRIDE; + library_iterator needed_library_end() const LLVM_OVERRIDE; error_code getRelocationAddend(DataRefImpl Rel, int64_t &Res) const; error_code getSymbolVersion(SymbolRef Symb, StringRef &Version, @@ -413,7 +413,7 @@ error_code ELFObjectFile::getSymbolSection(DataRefImpl Symb, const Elf_Sym *ESym = getSymbol(Symb); const Elf_Shdr *ESec = EF.getSection(ESym); if (!ESec) - Res = end_sections(); + Res = section_end(); else { DataRefImpl Sec; Sec.p = reinterpret_cast(ESec); @@ -571,12 +571,12 @@ template section_iterator ELFObjectFile::getRelocatedSection(DataRefImpl Sec) const { if (EF.getHeader()->e_type != ELF::ET_REL) - return end_sections(); + return section_end(); Elf_Shdr_Iter EShdr = toELFShdrIter(Sec); uintX_t Type = EShdr->sh_type; if (Type != ELF::SHT_REL && Type != ELF::SHT_RELA) - return end_sections(); + return section_end(); const Elf_Shdr *R = EF.getSection(EShdr->sh_info); return section_iterator(SectionRef(toDRI(R), this)); @@ -606,7 +606,7 @@ ELFObjectFile::getRelocationSymbol(DataRefImpl Rel) const { } } if (!symbolIdx) - return end_symbols(); + return symbol_end(); const Elf_Shdr *SymSec = EF.getSection(sec->sh_link); @@ -824,32 +824,32 @@ ELFObjectFile::ELFObjectFile(MemoryBuffer *Object, error_code &ec, EF(Object, ec) {} template -symbol_iterator ELFObjectFile::begin_symbols() const { +symbol_iterator ELFObjectFile::symbol_begin() const { return symbol_iterator(SymbolRef(toDRI(EF.begin_symbols()), this)); } template -symbol_iterator ELFObjectFile::end_symbols() const { +symbol_iterator ELFObjectFile::symbol_end() const { return symbol_iterator(SymbolRef(toDRI(EF.end_symbols()), this)); } template -symbol_iterator ELFObjectFile::begin_dynamic_symbols() const { +symbol_iterator ELFObjectFile::dynamic_symbol_begin() const { return symbol_iterator(SymbolRef(toDRI(EF.begin_dynamic_symbols()), this)); } template -symbol_iterator ELFObjectFile::end_dynamic_symbols() const { +symbol_iterator ELFObjectFile::dynamic_symbol_end() const { return symbol_iterator(SymbolRef(toDRI(EF.end_dynamic_symbols()), this)); } template -section_iterator ELFObjectFile::begin_sections() const { +section_iterator ELFObjectFile::section_begin() const { return section_iterator(SectionRef(toDRI(EF.begin_sections()), this)); } template -section_iterator ELFObjectFile::end_sections() const { +section_iterator ELFObjectFile::section_end() const { return section_iterator(SectionRef(toDRI(EF.end_sections()), this)); } @@ -867,7 +867,7 @@ StringRef ELFObjectFile::getLoadName() const { } template -library_iterator ELFObjectFile::begin_libraries_needed() const { +library_iterator ELFObjectFile::needed_library_begin() const { Elf_Dyn_Iter DI = EF.begin_dynamic_table(); Elf_Dyn_Iter DE = EF.end_dynamic_table(); @@ -900,7 +900,7 @@ error_code ELFObjectFile::getLibraryPath(DataRefImpl Data, } template -library_iterator ELFObjectFile::end_libraries_needed() const { +library_iterator ELFObjectFile::needed_library_end() const { return library_iterator(LibraryRef(toDRI(EF.end_dynamic_table()), this)); } diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index 44217fc54f..50cdfc3839 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -126,14 +126,14 @@ public: // TODO: Would be useful to have an iterator based version // of the load command interface too. - symbol_iterator begin_symbols() const LLVM_OVERRIDE; - symbol_iterator end_symbols() const LLVM_OVERRIDE; + symbol_iterator symbol_begin() const LLVM_OVERRIDE; + symbol_iterator symbol_end() const LLVM_OVERRIDE; - section_iterator begin_sections() const LLVM_OVERRIDE; - section_iterator end_sections() const LLVM_OVERRIDE; + section_iterator section_begin() const LLVM_OVERRIDE; + section_iterator section_end() const LLVM_OVERRIDE; - library_iterator begin_libraries_needed() const LLVM_OVERRIDE; - library_iterator end_libraries_needed() const LLVM_OVERRIDE; + library_iterator needed_library_begin() const LLVM_OVERRIDE; + library_iterator needed_library_end() const LLVM_OVERRIDE; uint8_t getBytesInAddress() const LLVM_OVERRIDE; diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index 3fac0e9646..786f803187 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -163,8 +163,8 @@ public: error_code containsSymbol(SymbolRef S, bool &Result) const; - relocation_iterator begin_relocations() const; - relocation_iterator end_relocations() const; + relocation_iterator relocation_begin() const; + relocation_iterator relocation_end() const; section_iterator getRelocatedSection() const; DataRefImpl getRawDataRefImpl() const; @@ -342,14 +342,14 @@ protected: public: - virtual symbol_iterator begin_symbols() const = 0; - virtual symbol_iterator end_symbols() const = 0; + virtual symbol_iterator symbol_begin() const = 0; + virtual symbol_iterator symbol_end() const = 0; - virtual section_iterator begin_sections() const = 0; - virtual section_iterator end_sections() const = 0; + virtual section_iterator section_begin() const = 0; + virtual section_iterator section_end() const = 0; - virtual library_iterator begin_libraries_needed() const = 0; - virtual library_iterator end_libraries_needed() const = 0; + virtual library_iterator needed_library_begin() const = 0; + virtual library_iterator needed_library_end() const = 0; /// @brief The number of bytes used to represent an address in this object /// file format. @@ -518,11 +518,11 @@ inline error_code SectionRef::containsSymbol(SymbolRef S, bool &Result) const { Result); } -inline relocation_iterator SectionRef::begin_relocations() const { +inline relocation_iterator SectionRef::relocation_begin() const { return OwningObject->section_rel_begin(SectionPimpl); } -inline relocation_iterator SectionRef::end_relocations() const { +inline relocation_iterator SectionRef::relocation_end() const { return OwningObject->section_rel_end(SectionPimpl); } -- cgit v1.2.3