From ea767137b6728dd06534dce506e5e9d2b898fabb Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 26 Jun 2015 14:51:16 +0000 Subject: [PATCH] Rename getObjectFile to getObject for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240785 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/ObjectFile.h | 4 ++-- include/llvm/Object/RelocVisitor.h | 4 ++-- lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp | 2 +- lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp | 2 +- tools/llvm-objdump/MachODump.cpp | 6 +++--- tools/llvm-objdump/llvm-objdump.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index 21430df19b7..b17063ffcac 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -67,7 +67,7 @@ public: DataRefImpl getRawDataRefImpl() const; - const ObjectFile *getObjectFile() const; + const ObjectFile *getObject() const; }; typedef content_iterator relocation_iterator; @@ -482,7 +482,7 @@ inline DataRefImpl RelocationRef::getRawDataRefImpl() const { return RelocationPimpl; } -inline const ObjectFile *RelocationRef::getObjectFile() const { +inline const ObjectFile *RelocationRef::getObject() const { return OwningObject; } diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h index cd1ba639057..4d671fc33bd 100644 --- a/include/llvm/Object/RelocVisitor.h +++ b/include/llvm/Object/RelocVisitor.h @@ -240,7 +240,7 @@ private: } int64_t getELFAddend(RelocationRef R) { - const auto *Obj = cast(R.getObjectFile()); + const auto *Obj = cast(R.getObject()); DataRefImpl DRI = R.getRawDataRefImpl(); ErrorOr AddendOrErr = Obj->getRelocationAddend(DRI); if (std::error_code EC = AddendOrErr.getError()) @@ -249,7 +249,7 @@ private: } uint8_t getLengthMachO64(RelocationRef R) { - const MachOObjectFile *Obj = cast(R.getObjectFile()); + const MachOObjectFile *Obj = cast(R.getObject()); return Obj->getRelocationLength(R.getRawDataRefImpl()); } diff --git a/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp b/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp index 6c7fb0d3e1e..8d2ae67dd7b 100644 --- a/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp +++ b/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp @@ -31,7 +31,7 @@ public: StringRef SymName; SymI->getName(SymName); uint64_t SymAddr; SymI->getAddress(SymAddr); - auto *Obj = cast(Rel.getObjectFile()); + auto *Obj = cast(Rel.getObject()); uint64_t SymSize = SymI->getSize(); int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl()); diff --git a/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp b/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp index a5aadd6a385..cc78e2c0ef2 100644 --- a/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp +++ b/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp @@ -25,7 +25,7 @@ public: X86_64MachORelocationInfo(MCContext &Ctx) : MCRelocationInfo(Ctx) {} const MCExpr *createExprForRelocation(RelocationRef Rel) override { - const MachOObjectFile *Obj = cast(Rel.getObjectFile()); + const MachOObjectFile *Obj = cast(Rel.getObject()); uint64_t RelType; Rel.getType(RelType); symbol_iterator SymI = Rel.getSymbol(); diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index 00eef6a654c..179c0a8ca05 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -6474,7 +6474,7 @@ static void printUnwindRelocDest(const MachOObjectFile *Obj, StringRef Name; uint64_t Addend; - if (!Reloc.getObjectFile()) + if (!Reloc.getObject()) return; findUnwindRelocNameAddend(Obj, Symbols, Reloc, Addr, Name, Addend); @@ -6547,7 +6547,7 @@ printMachOCompactUnwindSection(const MachOObjectFile *Obj, << format("0x%08" PRIx32, Entry.CompactEncoding) << '\n'; // 4. The personality function, if present. - if (Entry.PersonalityReloc.getObjectFile()) { + if (Entry.PersonalityReloc.getObject()) { outs() << " personality function: " << format("0x%" PRIx64, Entry.PersonalityAddr) << ' '; printUnwindRelocDest(Obj, Symbols, Entry.PersonalityReloc, @@ -6556,7 +6556,7 @@ printMachOCompactUnwindSection(const MachOObjectFile *Obj, } // 5. This entry's language-specific data area. - if (Entry.LSDAReloc.getObjectFile()) { + if (Entry.LSDAReloc.getObject()) { outs() << " LSDA: " << format("0x%" PRIx64, Entry.LSDAAddr) << ' '; printUnwindRelocDest(Obj, Symbols, Entry.LSDAReloc, Entry.LSDAAddr); diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index 61e75a7899a..77c425d617e 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -677,7 +677,7 @@ static std::error_code getRelocationValueString(const MachOObjectFile *Obj, static std::error_code getRelocationValueString(const RelocationRef &Rel, SmallVectorImpl &Result) { - const ObjectFile *Obj = Rel.getObjectFile(); + const ObjectFile *Obj = Rel.getObject(); if (auto *ELF = dyn_cast(Obj)) return getRelocationValueString(ELF, Rel, Result); if (auto *COFF = dyn_cast(Obj))