[lld] r251076 - ELF2: SymbolBody::repl() never returns a nullptr.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 16:10:25 PDT 2015
Author: ruiu
Date: Thu Oct 22 18:10:25 2015
New Revision: 251076
URL: http://llvm.org/viewvc/llvm-project?rev=251076&view=rev
Log:
ELF2: SymbolBody::repl() never returns a nullptr.
So we can use dyn_cast instead of dyn_cast_or_null here.
Modified:
lld/trunk/ELF/MarkLive.cpp
Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=251076&r1=251075&r2=251076&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Thu Oct 22 18:10:25 2015
@@ -102,7 +102,7 @@ template <class ELFT> void lld::elf2::ma
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);
};
More information about the llvm-commits
mailing list