[lld] r233453 - Remove else after return.

Rui Ueyama ruiu at google.com
Fri Mar 27 16:50:09 PDT 2015


Author: ruiu
Date: Fri Mar 27 18:50:09 2015
New Revision: 233453

URL: http://llvm.org/viewvc/llvm-project?rev=233453&view=rev
Log:
Remove else after return.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h

Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=233453&r1=233452&r2=233453&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Fri Mar 27 18:50:09 2015
@@ -633,17 +633,16 @@ DefaultLayout<ELFT>::addAtom(const Atom
 
       _referencedDynAtoms.insert(reloc->target());
     }
-
     return section->appendAtom(atom);
-  } else if (const AbsoluteAtom *absoluteAtom = dyn_cast<AbsoluteAtom>(atom)) {
+  }
+  if (const AbsoluteAtom *absoluteAtom = dyn_cast<AbsoluteAtom>(atom)) {
     // Absolute atoms are not part of any section, they are global for the whole
     // link
     _absoluteAtoms.push_back(new (_allocator)
         lld::AtomLayout(absoluteAtom, 0, absoluteAtom->value()));
     return _absoluteAtoms.back();
-  } else {
-    llvm_unreachable("Only absolute / defined atoms can be added here");
   }
+  llvm_unreachable("Only absolute / defined atoms can be added here");
 }
 
 /// Output sections with the same name into a OutputSection





More information about the llvm-commits mailing list