[lld] r234199 - Use llvm::cast at where we don't expect a null value.
Rui Ueyama
ruiu at google.com
Mon Apr 6 12:45:32 PDT 2015
Author: ruiu
Date: Mon Apr 6 14:45:32 2015
New Revision: 234199
URL: http://llvm.org/viewvc/llvm-project?rev=234199&view=rev
Log:
Use llvm::cast at where we don't expect a null value.
Modified:
lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=234199&r1=234198&r2=234199&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Mon Apr 6 14:45:32 2015
@@ -148,7 +148,7 @@ public:
StringRef targetSymbolName = targetAtom->name();
if (targetAtom->definition() != Atom::definitionRegular)
return targetAtom;
- if ((llvm::dyn_cast<DefinedAtom>(targetAtom))->scope() ==
+ if (llvm::cast<DefinedAtom>(targetAtom)->scope() ==
DefinedAtom::scopeTranslationUnit)
return targetAtom;
if (!redirectReferenceUsingUndefAtom(sourceSymbol, targetSymbol))
More information about the llvm-commits
mailing list