From b2ee25ac8ae39aaae8ea3b6419ca00109d6cea21 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 30 Nov 2017 18:02:04 +0000 Subject: [PATCH] Simplify. NFC. This particular reportDuplicate is only used with Defined. llvm-svn: 319451 --- lld/ELF/SymbolTable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index fb61cc29fed6..8aaed1f5bd42 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -427,8 +427,8 @@ static void reportDuplicate(Symbol *Sym, InputFile *NewFile) { template static void reportDuplicate(Symbol *Sym, InputSectionBase *ErrSec, typename ELFT::uint ErrOffset) { - Defined *D = dyn_cast(Sym); - if (!D || !D->Section || !ErrSec) { + Defined *D = cast(Sym); + if (!D->Section || !ErrSec) { reportDuplicate(Sym, ErrSec ? ErrSec->File : nullptr); return; }