diff options
| author | Rui Ueyama <ruiu@google.com> | 2014-04-03 21:16:37 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2014-04-03 21:16:37 +0000 |
| commit | 517f0d9b5f395b2616b0c849034468653c21695c (patch) | |
| tree | ba4216c2fbe9af9bdcd30233e94cd5d428e56aee /lld/lib/Core/Resolver.cpp | |
| parent | 83e6acc7f2a3a90e806f0f02cf01ba91124ce65f (diff) | |
| download | bcm5719-llvm-517f0d9b5f395b2616b0c849034468653c21695c.tar.gz bcm5719-llvm-517f0d9b5f395b2616b0c849034468653c21695c.zip | |
Minor cleanup.
llvm-svn: 205570
Diffstat (limited to 'lld/lib/Core/Resolver.cpp')
| -rw-r--r-- | lld/lib/Core/Resolver.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp index f642e0d7b48..cf4af5cd0f1 100644 --- a/lld/lib/Core/Resolver.cpp +++ b/lld/lib/Core/Resolver.cpp @@ -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()) { |

