Rename getObjectFile to getObject for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240785 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-06-26 14:51:16 +00:00
parent 9aa455951b
commit ea767137b6
6 changed files with 10 additions and 10 deletions

View File

@ -67,7 +67,7 @@ public:
DataRefImpl getRawDataRefImpl() const; DataRefImpl getRawDataRefImpl() const;
const ObjectFile *getObjectFile() const; const ObjectFile *getObject() const;
}; };
typedef content_iterator<RelocationRef> relocation_iterator; typedef content_iterator<RelocationRef> relocation_iterator;
@ -482,7 +482,7 @@ inline DataRefImpl RelocationRef::getRawDataRefImpl() const {
return RelocationPimpl; return RelocationPimpl;
} }
inline const ObjectFile *RelocationRef::getObjectFile() const { inline const ObjectFile *RelocationRef::getObject() const {
return OwningObject; return OwningObject;
} }

View File

@ -240,7 +240,7 @@ private:
} }
int64_t getELFAddend(RelocationRef R) { int64_t getELFAddend(RelocationRef R) {
const auto *Obj = cast<ELFObjectFileBase>(R.getObjectFile()); const auto *Obj = cast<ELFObjectFileBase>(R.getObject());
DataRefImpl DRI = R.getRawDataRefImpl(); DataRefImpl DRI = R.getRawDataRefImpl();
ErrorOr<int64_t> AddendOrErr = Obj->getRelocationAddend(DRI); ErrorOr<int64_t> AddendOrErr = Obj->getRelocationAddend(DRI);
if (std::error_code EC = AddendOrErr.getError()) if (std::error_code EC = AddendOrErr.getError())
@ -249,7 +249,7 @@ private:
} }
uint8_t getLengthMachO64(RelocationRef R) { uint8_t getLengthMachO64(RelocationRef R) {
const MachOObjectFile *Obj = cast<MachOObjectFile>(R.getObjectFile()); const MachOObjectFile *Obj = cast<MachOObjectFile>(R.getObject());
return Obj->getRelocationLength(R.getRawDataRefImpl()); return Obj->getRelocationLength(R.getRawDataRefImpl());
} }

View File

@ -31,7 +31,7 @@ public:
StringRef SymName; SymI->getName(SymName); StringRef SymName; SymI->getName(SymName);
uint64_t SymAddr; SymI->getAddress(SymAddr); uint64_t SymAddr; SymI->getAddress(SymAddr);
auto *Obj = cast<ELFObjectFileBase>(Rel.getObjectFile()); auto *Obj = cast<ELFObjectFileBase>(Rel.getObject());
uint64_t SymSize = SymI->getSize(); uint64_t SymSize = SymI->getSize();
int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl()); int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl());

View File

@ -25,7 +25,7 @@ public:
X86_64MachORelocationInfo(MCContext &Ctx) : MCRelocationInfo(Ctx) {} X86_64MachORelocationInfo(MCContext &Ctx) : MCRelocationInfo(Ctx) {}
const MCExpr *createExprForRelocation(RelocationRef Rel) override { const MCExpr *createExprForRelocation(RelocationRef Rel) override {
const MachOObjectFile *Obj = cast<MachOObjectFile>(Rel.getObjectFile()); const MachOObjectFile *Obj = cast<MachOObjectFile>(Rel.getObject());
uint64_t RelType; Rel.getType(RelType); uint64_t RelType; Rel.getType(RelType);
symbol_iterator SymI = Rel.getSymbol(); symbol_iterator SymI = Rel.getSymbol();

View File

@ -6474,7 +6474,7 @@ static void printUnwindRelocDest(const MachOObjectFile *Obj,
StringRef Name; StringRef Name;
uint64_t Addend; uint64_t Addend;
if (!Reloc.getObjectFile()) if (!Reloc.getObject())
return; return;
findUnwindRelocNameAddend(Obj, Symbols, Reloc, Addr, Name, Addend); findUnwindRelocNameAddend(Obj, Symbols, Reloc, Addr, Name, Addend);
@ -6547,7 +6547,7 @@ printMachOCompactUnwindSection(const MachOObjectFile *Obj,
<< format("0x%08" PRIx32, Entry.CompactEncoding) << '\n'; << format("0x%08" PRIx32, Entry.CompactEncoding) << '\n';
// 4. The personality function, if present. // 4. The personality function, if present.
if (Entry.PersonalityReloc.getObjectFile()) { if (Entry.PersonalityReloc.getObject()) {
outs() << " personality function: " outs() << " personality function: "
<< format("0x%" PRIx64, Entry.PersonalityAddr) << ' '; << format("0x%" PRIx64, Entry.PersonalityAddr) << ' ';
printUnwindRelocDest(Obj, Symbols, Entry.PersonalityReloc, printUnwindRelocDest(Obj, Symbols, Entry.PersonalityReloc,
@ -6556,7 +6556,7 @@ printMachOCompactUnwindSection(const MachOObjectFile *Obj,
} }
// 5. This entry's language-specific data area. // 5. This entry's language-specific data area.
if (Entry.LSDAReloc.getObjectFile()) { if (Entry.LSDAReloc.getObject()) {
outs() << " LSDA: " << format("0x%" PRIx64, outs() << " LSDA: " << format("0x%" PRIx64,
Entry.LSDAAddr) << ' '; Entry.LSDAAddr) << ' ';
printUnwindRelocDest(Obj, Symbols, Entry.LSDAReloc, Entry.LSDAAddr); printUnwindRelocDest(Obj, Symbols, Entry.LSDAReloc, Entry.LSDAAddr);

View File

@ -677,7 +677,7 @@ static std::error_code getRelocationValueString(const MachOObjectFile *Obj,
static std::error_code getRelocationValueString(const RelocationRef &Rel, static std::error_code getRelocationValueString(const RelocationRef &Rel,
SmallVectorImpl<char> &Result) { SmallVectorImpl<char> &Result) {
const ObjectFile *Obj = Rel.getObjectFile(); const ObjectFile *Obj = Rel.getObject();
if (auto *ELF = dyn_cast<ELFObjectFileBase>(Obj)) if (auto *ELF = dyn_cast<ELFObjectFileBase>(Obj))
return getRelocationValueString(ELF, Rel, Result); return getRelocationValueString(ELF, Rel, Result);
if (auto *COFF = dyn_cast<COFFObjectFile>(Obj)) if (auto *COFF = dyn_cast<COFFObjectFile>(Obj))