summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-11-30 18:02:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-11-30 18:02:04 +0000
commitb2ee25ac8ae39aaae8ea3b6419ca00109d6cea21 (patch)
treeeadf308cba23e7434bd86fcf8057f66cf826e6bb
parentceabd41cf742262aaceef7bb8d35557350b474a5 (diff)
downloadbcm5719-llvm-b2ee25ac8ae39aaae8ea3b6419ca00109d6cea21.tar.gz
bcm5719-llvm-b2ee25ac8ae39aaae8ea3b6419ca00109d6cea21.zip
Simplify. NFC.
This particular reportDuplicate is only used with Defined. llvm-svn: 319451
-rw-r--r--lld/ELF/SymbolTable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index fb61cc29fed..8aaed1f5bd4 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -427,8 +427,8 @@ static void reportDuplicate(Symbol *Sym, InputFile *NewFile) {
template <class ELFT>
static void reportDuplicate(Symbol *Sym, InputSectionBase *ErrSec,
typename ELFT::uint ErrOffset) {
- Defined *D = dyn_cast<Defined>(Sym);
- if (!D || !D->Section || !ErrSec) {
+ Defined *D = cast<Defined>(Sym);
+ if (!D->Section || !ErrSec) {
reportDuplicate(Sym, ErrSec ? ErrSec->File : nullptr);
return;
}
OpenPOWER on IntegriCloud