[lld] r367126 - [ELF] Simplify with dyn_cast_or_null. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 09:29:15 PDT 2019
Author: maskray
Date: Fri Jul 26 09:29:15 2019
New Revision: 367126
URL: http://llvm.org/viewvc/llvm-project?rev=367126&view=rev
Log:
[ELF] Simplify with dyn_cast_or_null. NFC
Modified:
lld/trunk/ELF/Symbols.cpp
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=367126&r1=367125&r2=367126&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Fri Jul 26 09:29:15 2019
@@ -560,7 +560,7 @@ int Symbol::compare(const Symbol *other)
auto *oldSym = cast<Defined>(this);
auto *newSym = cast<Defined>(other);
- if (other->file && isa<BitcodeFile>(other->file))
+ if (dyn_cast_or_null<BitcodeFile>(other->file))
return 0;
if (!oldSym->section && !newSym->section && oldSym->value == newSym->value &&
More information about the llvm-commits
mailing list