[lld] r250030 - Delete getFirstELF.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 04:52:31 PDT 2015
Author: rafael
Date: Mon Oct 12 06:52:31 2015
New Revision: 250030
URL: http://llvm.org/viewvc/llvm-project?rev=250030&view=rev
Log:
Delete getFirstELF.
Modified:
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=250030&r1=250029&r2=250030&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Mon Oct 12 06:52:31 2015
@@ -22,7 +22,7 @@ using namespace lld::elf2;
template <class ELFT> SymbolTable<ELFT>::SymbolTable() {}
template <class ELFT> bool SymbolTable<ELFT>::shouldUseRela() const {
- ELFKind K = getFirstELF()->getELFKind();
+ ELFKind K = cast<ELFFileBase<ELFT>>(Config->FirstElf)->getELFKind();
return K == ELF64LEKind || K == ELF64BEKind;
}
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=250030&r1=250029&r2=250030&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Mon Oct 12 06:52:31 2015
@@ -33,14 +33,6 @@ public:
void addFile(std::unique_ptr<InputFile> File);
- const ELFFileBase<ELFT> *getFirstELF() const {
- if (!ObjectFiles.empty())
- return ObjectFiles[0].get();
- if (!SharedFiles.empty())
- return SharedFiles[0].get();
- return nullptr;
- }
-
bool shouldUseRela() const;
const llvm::MapVector<StringRef, Symbol *> &getSymbols() const {
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=250030&r1=250029&r2=250030&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon Oct 12 06:52:31 2015
@@ -583,7 +583,7 @@ template <class ELFT> void Writer<ELFT>:
: ELFDATA2MSB;
EHdr->e_ident[EI_VERSION] = EV_CURRENT;
- auto &FirstObj = cast<ObjectFile<ELFT>>(*Symtab.getFirstELF());
+ auto &FirstObj = cast<ELFFileBase<ELFT>>(*Config->FirstElf);
EHdr->e_ident[EI_OSABI] = FirstObj.getOSABI();
// FIXME: Generalize the segment construction similar to how we create
More information about the llvm-commits
mailing list