From c53b3b080956305d9cdae9099da6722cf0844647 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 10 Dec 2013 06:19:09 +0000 Subject: Style fixes. No functionality change. llvm-svn: 196883 --- lld/lib/Passes/LayoutPass.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'lld/lib/Passes/LayoutPass.cpp') diff --git a/lld/lib/Passes/LayoutPass.cpp b/lld/lib/Passes/LayoutPass.cpp index 61b53932ad8..272042bdfe6 100644 --- a/lld/lib/Passes/LayoutPass.cpp +++ b/lld/lib/Passes/LayoutPass.cpp @@ -416,19 +416,17 @@ void LayoutPass::buildInGroupTable(MutableFile::DefinedAtomRange &range) { // Check if the current atom is part of the chain bool isAtomInChain = false; const DefinedAtom *lastAtom = rootAtom; - while (true) { + for (;;) { AtomToAtomT::iterator followOnAtomsIter = - _followOnNexts.find(lastAtom); + _followOnNexts.find(lastAtom); if (followOnAtomsIter != _followOnNexts.end()) { lastAtom = followOnAtomsIter->second; - if (lastAtom == ai) { - isAtomInChain = true; - break; - } + if (lastAtom != ai) + continue; + isAtomInChain = true; } - else - break; - } // findAtomInChain + break; + } if (!isAtomInChain) _followOnNexts[lastAtom] = ai; @@ -517,9 +515,8 @@ void LayoutPass::buildOrdinalOverrideMap(MutableFile::DefinedAtomRange &range) { for (const DefinedAtom *nextAtom = start->second; nextAtom != NULL; nextAtom = _followOnNexts[nextAtom]) { AtomToOrdinalT::iterator pos = _ordinalOverrideMap.find(nextAtom); - if (pos == _ordinalOverrideMap.end()) { + if (pos == _ordinalOverrideMap.end()) _ordinalOverrideMap[nextAtom] = index++; - } } } } -- cgit v1.2.3