ELF2: SymbolBody::repl() never returns a nullptr.

So we can use dyn_cast instead of dyn_cast_or_null here.

llvm-svn: 251076
This commit is contained in:
Rui Ueyama
2015-10-22 23:10:25 +00:00
parent 09d2a5f6e1
commit 2beabc9be5

View File

@@ -102,7 +102,7 @@ template <class ELFT> void lld::elf2::markLive(SymbolTable<ELFT> *Symtab) {
auto MarkSymbol = [&](SymbolBody *Sym) {
if (Sym)
if (auto *D = dyn_cast_or_null<DefinedRegular<ELFT>>(Sym->repl()))
if (auto *D = dyn_cast<DefinedRegular<ELFT>>(Sym->repl()))
Enqueue(&D->Section);
};