[lld] r310090 - Simplify. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 4 11:42:04 PDT 2017
Author: rafael
Date: Fri Aug 4 11:42:04 2017
New Revision: 310090
URL: http://llvm.org/viewvc/llvm-project?rev=310090&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=310090&r1=310089&r2=310090&view=diff
==============================================================================
--- lld/trunk/ELF/MapFile.cpp (original)
+++ lld/trunk/ELF/MapFile.cpp Fri Aug 4 11:42:04 2017
@@ -52,10 +52,10 @@ template <class ELFT> static std::vector
std::vector<DefinedRegular *> V;
for (ObjFile<ELFT> *File : ObjFile<ELFT>::Instances)
for (SymbolBody *B : File->getSymbols())
- if (B->File == File && !B->isSection())
- if (auto *Sym = dyn_cast<DefinedRegular>(B))
- if (Sym->Section && Sym->Section->Live)
- V.push_back(Sym);
+ if (auto *DR = dyn_cast<DefinedRegular>(B))
+ if (DR->File == File && !DR->isSection() && DR->Section &&
+ DR->Section->Live)
+ V.push_back(DR);
return V;
}
More information about the llvm-commits
mailing list