llvm.org GIT mirror llvm / ea76713
Rename getObjectFile to getObject for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240785 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
6 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
6666
6767
6868 DataRefImpl getRawDataRefImpl() const;
69 const ObjectFile *getObjectFile() const;
69 const ObjectFile *getObject() const;
7070 };
7171 typedef content_iterator relocation_iterator;
7272
481481 return RelocationPimpl;
482482 }
483483
484 inline const ObjectFile *RelocationRef::getObjectFile() const {
484 inline const ObjectFile *RelocationRef::getObject() const {
485485 return OwningObject;
486486 }
487487
239239 }
240240
241241 int64_t getELFAddend(RelocationRef R) {
242 const auto *Obj = cast(R.getObjectFile());
242 const auto *Obj = cast(R.getObject());
243243 DataRefImpl DRI = R.getRawDataRefImpl();
244244 ErrorOr AddendOrErr = Obj->getRelocationAddend(DRI);
245245 if (std::error_code EC = AddendOrErr.getError())
248248 }
249249
250250 uint8_t getLengthMachO64(RelocationRef R) {
251 const MachOObjectFile *Obj = cast(R.getObjectFile());
251 const MachOObjectFile *Obj = cast(R.getObject());
252252 return Obj->getRelocationLength(R.getRawDataRefImpl());
253253 }
254254
3030
3131 StringRef SymName; SymI->getName(SymName);
3232 uint64_t SymAddr; SymI->getAddress(SymAddr);
33 auto *Obj = cast(Rel.getObjectFile());
33 auto *Obj = cast(Rel.getObject());
3434 uint64_t SymSize = SymI->getSize();
3535 int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl());
3636
2424 X86_64MachORelocationInfo(MCContext &Ctx) : MCRelocationInfo(Ctx) {}
2525
2626 const MCExpr *createExprForRelocation(RelocationRef Rel) override {
27 const MachOObjectFile *Obj = cast(Rel.getObjectFile());
27 const MachOObjectFile *Obj = cast(Rel.getObject());
2828
2929 uint64_t RelType; Rel.getType(RelType);
3030 symbol_iterator SymI = Rel.getSymbol();
64736473 StringRef Name;
64746474 uint64_t Addend;
64756475
6476 if (!Reloc.getObjectFile())
6476 if (!Reloc.getObject())
64776477 return;
64786478
64796479 findUnwindRelocNameAddend(Obj, Symbols, Reloc, Addr, Name, Addend);
65466546 << format("0x%08" PRIx32, Entry.CompactEncoding) << '\n';
65476547
65486548 // 4. The personality function, if present.
6549 if (Entry.PersonalityReloc.getObjectFile()) {
6549 if (Entry.PersonalityReloc.getObject()) {
65506550 outs() << " personality function: "
65516551 << format("0x%" PRIx64, Entry.PersonalityAddr) << ' ';
65526552 printUnwindRelocDest(Obj, Symbols, Entry.PersonalityReloc,
65556555 }
65566556
65576557 // 5. This entry's language-specific data area.
6558 if (Entry.LSDAReloc.getObjectFile()) {
6558 if (Entry.LSDAReloc.getObject()) {
65596559 outs() << " LSDA: " << format("0x%" PRIx64,
65606560 Entry.LSDAAddr) << ' ';
65616561 printUnwindRelocDest(Obj, Symbols, Entry.LSDAReloc, Entry.LSDAAddr);
676676
677677 static std::error_code getRelocationValueString(const RelocationRef &Rel,
678678 SmallVectorImpl &Result) {
679 const ObjectFile *Obj = Rel.getObjectFile();
679 const ObjectFile *Obj = Rel.getObject();
680680 if (auto *ELF = dyn_cast(Obj))
681681 return getRelocationValueString(ELF, Rel, Result);
682682 if (auto *COFF = dyn_cast(Obj))