Simplify. No functionality change.

llvm-svn: 198036
This commit is contained in:
Rui Ueyama 2013-12-26 07:02:33 +00:00
parent 0cbd7e0d03
commit c481b5b66d
1 changed files with 3 additions and 6 deletions

View File

@ -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