[lld] r319370 - Simplify. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 14:20:03 PST 2017


Author: rafael
Date: Wed Nov 29 14:20:03 2017
New Revision: 319370

URL: http://llvm.org/viewvc/llvm-project?rev=319370&view=rev
Log:
Simplify. NFC.

Modified:
    lld/trunk/ELF/MapFile.cpp

Modified: lld/trunk/ELF/MapFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=319370&r1=319369&r2=319370&view=diff
==============================================================================
--- lld/trunk/ELF/MapFile.cpp (original)
+++ lld/trunk/ELF/MapFile.cpp Wed Nov 29 14:20:03 2017
@@ -62,8 +62,7 @@ static std::vector<Defined *> getSymbols
 static SymbolMapTy getSectionSyms(ArrayRef<Defined *> Syms) {
   SymbolMapTy Ret;
   for (Defined *S : Syms)
-    if (auto *DR = dyn_cast<Defined>(S))
-      Ret[DR->Section].push_back(S);
+    Ret[S->Section].push_back(S);
 
   // Sort symbols by address. We want to print out symbols in the
   // order in the output file rather than the order they appeared




More information about the llvm-commits mailing list