Inline trivial method. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-28 20:53:09 +00:00
parent 34aecd4f40
commit db8eb52635

View File

@@ -187,9 +187,6 @@ class ELFObjectWriter : public MCObjectWriter {
MCValue Target, bool &IsPCRel, MCValue Target, bool &IsPCRel,
uint64_t &FixedValue) override; uint64_t &FixedValue) override;
uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
const MCSymbol *S);
// Map from a signature symbol to the group section index // Map from a signature symbol to the group section index
typedef DenseMap<const MCSymbol *, unsigned> RevGroupMapTy; typedef DenseMap<const MCSymbol *, unsigned> RevGroupMapTy;
@@ -729,14 +726,6 @@ void ELFObjectWriter::RecordRelocation(MCAssembler &Asm,
return; return;
} }
uint64_t
ELFObjectWriter::getSymbolIndexInSymbolTable(const MCAssembler &Asm,
const MCSymbol *S) {
assert(S->hasData());
return S->getIndex();
}
bool ELFObjectWriter::isInSymtab(const MCAsmLayout &Layout, bool ELFObjectWriter::isInSymtab(const MCAsmLayout &Layout,
const MCSymbol &Symbol, bool Used, const MCSymbol &Symbol, bool Used,
bool Renamed) { bool Renamed) {
@@ -1128,8 +1117,7 @@ void ELFObjectWriter::writeRelocations(const MCAssembler &Asm,
for (unsigned i = 0, e = Relocs.size(); i != e; ++i) { for (unsigned i = 0, e = Relocs.size(); i != e; ++i) {
const ELFRelocationEntry &Entry = Relocs[e - i - 1]; const ELFRelocationEntry &Entry = Relocs[e - i - 1];
unsigned Index = unsigned Index = Entry.Symbol ? Entry.Symbol->getIndex() : 0;
Entry.Symbol ? getSymbolIndexInSymbolTable(Asm, Entry.Symbol) : 0;
if (is64Bit()) { if (is64Bit()) {
write(Entry.Offset); write(Entry.Offset);
@@ -1232,7 +1220,7 @@ void ELFObjectWriter::writeSectionHeader(
if (Type != ELF::SHT_GROUP) if (Type != ELF::SHT_GROUP)
GroupSymbolIndex = 0; GroupSymbolIndex = 0;
else else
GroupSymbolIndex = getSymbolIndexInSymbolTable(Asm, Section->getGroup()); GroupSymbolIndex = Section->getGroup()->getIndex();
const std::pair<uint64_t, uint64_t> &Offsets = const std::pair<uint64_t, uint64_t> &Offsets =
SectionOffsets.find(Section)->second; SectionOffsets.find(Section)->second;