DataRefImpl getRawDataRefImpl() const;
- const ObjectFile *getObjectFile() const;
+ const ObjectFile *getObject() const;
};
typedef content_iterator<RelocationRef> relocation_iterator;
return RelocationPimpl;
}
-inline const ObjectFile *RelocationRef::getObjectFile() const {
+inline const ObjectFile *RelocationRef::getObject() const {
return OwningObject;
}
}
int64_t getELFAddend(RelocationRef R) {
- const auto *Obj = cast<ELFObjectFileBase>(R.getObjectFile());
+ const auto *Obj = cast<ELFObjectFileBase>(R.getObject());
DataRefImpl DRI = R.getRawDataRefImpl();
ErrorOr<int64_t> AddendOrErr = Obj->getRelocationAddend(DRI);
if (std::error_code EC = AddendOrErr.getError())
}
uint8_t getLengthMachO64(RelocationRef R) {
- const MachOObjectFile *Obj = cast<MachOObjectFile>(R.getObjectFile());
+ const MachOObjectFile *Obj = cast<MachOObjectFile>(R.getObject());
return Obj->getRelocationLength(R.getRawDataRefImpl());
}
StringRef SymName; SymI->getName(SymName);
uint64_t SymAddr; SymI->getAddress(SymAddr);
- auto *Obj = cast<ELFObjectFileBase>(Rel.getObjectFile());
+ auto *Obj = cast<ELFObjectFileBase>(Rel.getObject());
uint64_t SymSize = SymI->getSize();
int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl());
X86_64MachORelocationInfo(MCContext &Ctx) : MCRelocationInfo(Ctx) {}
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);
symbol_iterator SymI = Rel.getSymbol();
StringRef Name;
uint64_t Addend;
- if (!Reloc.getObjectFile())
+ if (!Reloc.getObject())
return;
findUnwindRelocNameAddend(Obj, Symbols, Reloc, Addr, Name, Addend);
<< 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,
}
// 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);
static std::error_code getRelocationValueString(const RelocationRef &Rel,
SmallVectorImpl<char> &Result) {
- const ObjectFile *Obj = Rel.getObjectFile();
+ const ObjectFile *Obj = Rel.getObject();
if (auto *ELF = dyn_cast<ELFObjectFileBase>(Obj))
return getRelocationValueString(ELF, Rel, Result);
if (auto *COFF = dyn_cast<COFFObjectFile>(Obj))