[lld] r263364 - Body can never be null in this context.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 12 20:40:12 PST 2016
Author: ruiu
Date: Sat Mar 12 22:40:12 2016
New Revision: 263364
URL: http://llvm.org/viewvc/llvm-project?rev=263364&view=rev
Log:
Body can never be null in this context.
Because of the recent commit to allocate SymbolBodies for local symbols.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=263364&r1=263363&r2=263364&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Sat Mar 12 22:40:12 2016
@@ -352,7 +352,7 @@ void Writer<ELFT>::scanRelocs(
// If a symbol in a DSO is referenced directly instead of through GOT,
// we need to create a copy relocation for the symbol.
- if (auto *B = dyn_cast_or_null<SharedSymbol<ELFT>>(&Body)) {
+ if (auto *B = dyn_cast<SharedSymbol<ELFT>>(&Body)) {
if (B->needsCopy())
continue;
if (Target->needsCopyRel<ELFT>(Type, *B)) {
More information about the llvm-commits
mailing list