diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Object/SymbolSize.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/SymbolSize.cpp b/llvm/lib/Object/SymbolSize.cpp index 78d620503a8..730e54cf330 100644 --- a/llvm/lib/Object/SymbolSize.cpp +++ b/llvm/lib/Object/SymbolSize.cpp @@ -55,8 +55,8 @@ llvm::object::computeSymbolSizes(const ObjectFile &O) { auto Syms = E->symbols(); if (Syms.begin() == Syms.end()) Syms = E->getDynamicSymbolIterators(); - for (SymbolRef Sym : Syms) - Ret.push_back({Sym, E->getSymbolSize(Sym)}); + for (ELFSymbolRef Sym : Syms) + Ret.push_back({Sym, Sym.getSize()}); return Ret; } diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp index a84c4c58494..6c7fb0d3e1e 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp @@ -27,12 +27,12 @@ public: const MCExpr *createExprForRelocation(RelocationRef Rel) override { uint64_t RelType; Rel.getType(RelType); - symbol_iterator SymI = Rel.getSymbol(); + elf_symbol_iterator SymI = Rel.getSymbol(); StringRef SymName; SymI->getName(SymName); uint64_t SymAddr; SymI->getAddress(SymAddr); auto *Obj = cast<ELFObjectFileBase>(Rel.getObjectFile()); - uint64_t SymSize = Obj->getSymbolSize(*SymI); + uint64_t SymSize = SymI->getSize(); int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl()); MCSymbol *Sym = Ctx.getOrCreateSymbol(SymName); |