summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-03-09 13:05:26 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-03-09 13:05:26 +0000
commit8d8e340c613b0fd0c601f560d995b744db5b048a (patch)
tree0f127db338c96879513602a2f6937a10b57fb590
parent82381f97b9895c11f9b2b40717bfd2f98b3ba273 (diff)
downloadbcm5719-llvm-8d8e340c613b0fd0c601f560d995b744db5b048a.tar.gz
bcm5719-llvm-8d8e340c613b0fd0c601f560d995b744db5b048a.zip
[Mips] Reduce the code indentation.
llvm-svn: 203405
-rw-r--r--lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h b/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h
index 60f29305613..a2b8d554b31 100644
--- a/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h
+++ b/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h
@@ -42,24 +42,25 @@ public:
}
void finalizeMipsRuntimeAtomValues() {
- if (_mipsLinkingContext.isDynamic()) {
- auto gotSection = _mipsTargetLayout.findOutputSection(".got");
- auto got = gotSection ? gotSection->virtualAddr() : 0;
- auto gp = gotSection ? got + _mipsTargetLayout.getGPOffset() : 0;
+ if (!_mipsLinkingContext.isDynamic())
+ return;
- auto gotAtomIter =
- _mipsTargetLayout.findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_");
- assert(gotAtomIter != _mipsTargetLayout.absoluteAtoms().end());
- (*gotAtomIter)->_virtualAddr = got;
+ auto gotSection = _mipsTargetLayout.findOutputSection(".got");
+ auto got = gotSection ? gotSection->virtualAddr() : 0;
+ auto gp = gotSection ? got + _mipsTargetLayout.getGPOffset() : 0;
- auto gpAtomIter = _mipsTargetLayout.findAbsoluteAtom("_gp");
- assert(gpAtomIter != _mipsTargetLayout.absoluteAtoms().end());
- (*gpAtomIter)->_virtualAddr = gp;
+ auto gotAtomIter =
+ _mipsTargetLayout.findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_");
+ assert(gotAtomIter != _mipsTargetLayout.absoluteAtoms().end());
+ (*gotAtomIter)->_virtualAddr = got;
- AtomLayout *gpAtom = _mipsTargetLayout.getGP();
- assert(gpAtom != nullptr);
- gpAtom->_virtualAddr = gp;
- }
+ auto gpAtomIter = _mipsTargetLayout.findAbsoluteAtom("_gp");
+ assert(gpAtomIter != _mipsTargetLayout.absoluteAtoms().end());
+ (*gpAtomIter)->_virtualAddr = gp;
+
+ AtomLayout *gpAtom = _mipsTargetLayout.getGP();
+ assert(gpAtom != nullptr);
+ gpAtom->_virtualAddr = gp;
}
bool hasGlobalGOTEntry(const Atom *a) const {
OpenPOWER on IntegriCloud