Use early return. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-10-03 00:57:12 +00:00
parent 7db865a9ea
commit 4a2dc8f082

View File

@ -39,19 +39,19 @@ MCObjectStreamer::~MCObjectStreamer() {
}
void MCObjectStreamer::flushPendingLabels(MCFragment *F, uint64_t FOffset) {
if (PendingLabels.size()) {
if (!F) {
F = new MCDataFragment();
MCSection *CurSection = getCurrentSectionOnly();
CurSection->getFragmentList().insert(CurInsertionPoint, F);
F->setParent(CurSection);
}
for (MCSymbol *Sym : PendingLabels) {
Sym->setFragment(F);
Sym->setOffset(FOffset);
}
PendingLabels.clear();
if (PendingLabels.empty())
return;
if (!F) {
F = new MCDataFragment();
MCSection *CurSection = getCurrentSectionOnly();
CurSection->getFragmentList().insert(CurInsertionPoint, F);
F->setParent(CurSection);
}
for (MCSymbol *Sym : PendingLabels) {
Sym->setFragment(F);
Sym->setOffset(FOffset);
}
PendingLabels.clear();
}
void MCObjectStreamer::emitAbsoluteSymbolDiff(const MCSymbol *Hi,