diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-10-03 00:57:12 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-10-03 00:57:12 +0000 |
commit | 81413c0ca0e42e55101d0fc2381a000b4196c8b5 (patch) | |
tree | 53b594c493cddd8d24494feb00aa6bf3033ed478 /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | b470942f2a6d03033434806e844189a3c8ab3862 (diff) | |
download | bcm5719-llvm-81413c0ca0e42e55101d0fc2381a000b4196c8b5.tar.gz bcm5719-llvm-81413c0ca0e42e55101d0fc2381a000b4196c8b5.zip |
Use early return. NFC.
llvm-svn: 249224
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 489ab06c268..caee5da47a0 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -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, |