[lld] r205570 - Minor cleanup.
Rui Ueyama
ruiu at google.com
Thu Apr 3 14:16:37 PDT 2014
Author: ruiu
Date: Thu Apr 3 16:16:37 2014
New Revision: 205570
URL: http://llvm.org/viewvc/llvm-project?rev=205570&view=rev
Log:
Minor cleanup.
Modified:
lld/trunk/lib/Core/Resolver.cpp
Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=205570&r1=205569&r2=205570&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Thu Apr 3 16:16:37 2014
@@ -363,15 +363,11 @@ void Resolver::deadStripOptimize() {
assert(_liveAtoms.empty());
// By default, shared libraries are built with all globals as dead strip roots
- if (_context.globalsAreDeadStripRoots()) {
- for (const Atom *atom : _atoms) {
- const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom);
- if (defAtom == nullptr)
- continue;
- if (defAtom->scope() == DefinedAtom::scopeGlobal)
- _deadStripRoots.insert(defAtom);
- }
- }
+ if (_context.globalsAreDeadStripRoots())
+ for (const Atom *atom : _atoms)
+ if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom))
+ if (defAtom->scope() == DefinedAtom::scopeGlobal)
+ _deadStripRoots.insert(defAtom);
// Or, use list of names that are dead strip roots.
for (const StringRef &name : _context.deadStripRoots()) {
More information about the llvm-commits
mailing list