diff options
| author | Rui Ueyama <ruiu@google.com> | 2013-12-10 06:19:09 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2013-12-10 06:19:09 +0000 |
| commit | c53b3b080956305d9cdae9099da6722cf0844647 (patch) | |
| tree | 1945ed567ae7f5815865dbf647e7577ec05c882c /lld/lib/Passes/LayoutPass.cpp | |
| parent | 7ce0fe015e61da103db42985a8f19537146ae920 (diff) | |
| download | bcm5719-llvm-c53b3b080956305d9cdae9099da6722cf0844647.tar.gz bcm5719-llvm-c53b3b080956305d9cdae9099da6722cf0844647.zip | |
Style fixes. No functionality change.
llvm-svn: 196883
Diffstat (limited to 'lld/lib/Passes/LayoutPass.cpp')
| -rw-r--r-- | lld/lib/Passes/LayoutPass.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
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++; - } } } } |

