Delete dead code.

llvm-svn: 244040
This commit is contained in:
Rafael Espindola 2015-08-05 13:26:54 +00:00
parent ec3af0f94e
commit e3335d8a66
3 changed files with 4 additions and 12 deletions

View File

@ -34,7 +34,6 @@ void SymbolTable::addObject(ObjectFileBase *File) {
ObjectFiles.emplace_back(File);
for (SymbolBody *Body : File->getSymbols())
if (Body->isExternal())
resolve(Body);
}

View File

@ -28,10 +28,8 @@ getSymbolName(const llvm::object::ELFFile<ELFT> *F,
template <class ELFT>
DefinedRegular<ELFT>::DefinedRegular(ObjectFile<ELFT> *F, const Elf_Sym *S)
: Defined(DefinedRegularKind, getSymbolName<ELFT>(F->getObj(), S)), File(F),
Sym(S) {
IsExternal = S->isExternal();
}
: Defined(DefinedRegularKind, getSymbolName<ELFT>(F->getObj(), S)),
File(F) {}
// Returns 1, 0 or -1 if this symbol should take precedence
// over the Other, tie or lose, respectively.

View File

@ -43,9 +43,6 @@ public:
Kind kind() const { return static_cast<Kind>(SymbolKind); }
// Returns true if this is an external symbol.
bool isExternal() const { return true; }
// Returns the symbol name.
StringRef getName() const { return Name; }
@ -65,11 +62,10 @@ public:
protected:
SymbolBody(Kind K, StringRef N = "")
: SymbolKind(K), IsExternal(true), Name(N) {}
: SymbolKind(K), Name(N) {}
protected:
const unsigned SymbolKind : 8;
unsigned IsExternal : 1;
StringRef Name;
Symbol *Backref = nullptr;
};
@ -99,7 +95,6 @@ public:
private:
ObjectFile<ELFT> *File;
const Elf_Sym *Sym;
};
// Undefined symbols.