[llvm] r238492 - Inline trivial method. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu May 28 13:53:09 PDT 2015
Author: rafael
Date: Thu May 28 15:53:09 2015
New Revision: 238492
URL: http://llvm.org/viewvc/llvm-project?rev=238492&view=rev
Log:
Inline trivial method. NFC.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=238492&r1=238491&r2=238492&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Thu May 28 15:53:09 2015
@@ -187,9 +187,6 @@ class ELFObjectWriter : public MCObjectW
MCValue Target, bool &IsPCRel,
uint64_t &FixedValue) override;
- uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
- const MCSymbol *S);
-
// Map from a signature symbol to the group section index
typedef DenseMap<const MCSymbol *, unsigned> RevGroupMapTy;
@@ -729,14 +726,6 @@ void ELFObjectWriter::RecordRelocation(M
return;
}
-
-uint64_t
-ELFObjectWriter::getSymbolIndexInSymbolTable(const MCAssembler &Asm,
- const MCSymbol *S) {
- assert(S->hasData());
- return S->getIndex();
-}
-
bool ELFObjectWriter::isInSymtab(const MCAsmLayout &Layout,
const MCSymbol &Symbol, bool Used,
bool Renamed) {
@@ -1128,8 +1117,7 @@ void ELFObjectWriter::writeRelocations(c
for (unsigned i = 0, e = Relocs.size(); i != e; ++i) {
const ELFRelocationEntry &Entry = Relocs[e - i - 1];
- unsigned Index =
- Entry.Symbol ? getSymbolIndexInSymbolTable(Asm, Entry.Symbol) : 0;
+ unsigned Index = Entry.Symbol ? Entry.Symbol->getIndex() : 0;
if (is64Bit()) {
write(Entry.Offset);
@@ -1232,7 +1220,7 @@ void ELFObjectWriter::writeSectionHeader
if (Type != ELF::SHT_GROUP)
GroupSymbolIndex = 0;
else
- GroupSymbolIndex = getSymbolIndexInSymbolTable(Asm, Section->getGroup());
+ GroupSymbolIndex = Section->getGroup()->getIndex();
const std::pair<uint64_t, uint64_t> &Offsets =
SectionOffsets.find(Section)->second;
More information about the llvm-commits
mailing list