summaryrefslogtreecommitdiffstats
path: root/lld/lib/Passes
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-12-10 06:19:09 +0000
committerRui Ueyama <ruiu@google.com>2013-12-10 06:19:09 +0000
commitc53b3b080956305d9cdae9099da6722cf0844647 (patch)
tree1945ed567ae7f5815865dbf647e7577ec05c882c /lld/lib/Passes
parent7ce0fe015e61da103db42985a8f19537146ae920 (diff)
downloadbcm5719-llvm-c53b3b080956305d9cdae9099da6722cf0844647.tar.gz
bcm5719-llvm-c53b3b080956305d9cdae9099da6722cf0844647.zip
Style fixes. No functionality change.
llvm-svn: 196883
Diffstat (limited to 'lld/lib/Passes')
-rw-r--r--lld/lib/Passes/GOTPass.cpp6
-rw-r--r--lld/lib/Passes/LayoutPass.cpp19
2 files changed, 11 insertions, 14 deletions
diff --git a/lld/lib/Passes/GOTPass.cpp b/lld/lib/Passes/GOTPass.cpp
index f29c35b0b64..9827952a295 100644
--- a/lld/lib/Passes/GOTPass.cpp
+++ b/lld/lib/Passes/GOTPass.cpp
@@ -100,8 +100,8 @@ void GOTPass::perform(std::unique_ptr<MutableFile> &mergedFile) {
}
// add all created GOT Atoms to master file
- for (auto &it : targetToGOT) {
+ for (auto &it : targetToGOT)
mergedFile->addAtom(*it.second);
- }
-}
}
+
+} // end namesapce lld
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++;
- }
}
}
}
OpenPOWER on IntegriCloud