[lld] r198036 - Simplify. No functionality change.
Rui Ueyama
ruiu at google.com
Wed Dec 25 23:02:33 PST 2013
Author: ruiu
Date: Thu Dec 26 01:02:33 2013
New Revision: 198036
URL: http://llvm.org/viewvc/llvm-project?rev=198036&view=rev
Log:
Simplify. No functionality change.
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=198036&r1=198035&r2=198036&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Thu Dec 26 01:02:33 2013
@@ -318,13 +318,10 @@ void Resolver::markLive(const Atom &atom
_liveAtoms.insert(&atom);
// mark all atoms it references as live
- if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(&atom)) {
- for (const Reference *ref : *defAtom) {
- const Atom *target = ref->target();
- if (target != nullptr)
+ if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(&atom))
+ for (const Reference *ref : *defAtom)
+ if (const Atom *target = ref->target())
this->markLive(*target);
- }
- }
}
// remove all atoms not actually used
More information about the llvm-commits
mailing list