Remove unnecessary cast.

llvm-svn: 256196
This commit is contained in:
Rafael Espindola
2015-12-21 20:50:51 +00:00
parent 1e2967e81c
commit 495bb46b34

View File

@@ -1141,7 +1141,7 @@ template <class ELFT> void Writer<ELFT>::writeSections() {
template <class ELFT>
typename ELFFile<ELFT>::uintX_t Writer<ELFT>::getEntryAddr() const {
if (Config->EntrySym) {
if (auto *E = dyn_cast<ELFSymbolBody<ELFT>>(Config->EntrySym->repl()))
if (SymbolBody *E = Config->EntrySym->repl())
return getSymVA<ELFT>(*E);
return 0;
}