[lld] r306307 - Remove confusing `return`.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 09:52:16 PDT 2017


Author: ruiu
Date: Mon Jun 26 09:52:16 2017
New Revision: 306307

URL: http://llvm.org/viewvc/llvm-project?rev=306307&view=rev
Log:
Remove confusing `return`.

`addInputSec` returns void. Even though it is syntactically correct,
the use of `return` here is just confusing.

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=306307&r1=306306&r2=306307&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Mon Jun 26 09:52:16 2017
@@ -305,7 +305,7 @@ void OutputSectionFactory::addInputSec(I
 
   SectionKey Key = createKey(IS, OutsecName);
   OutputSection *&Sec = Map[Key];
-  return addInputSec(IS, OutsecName, Sec);
+  addInputSec(IS, OutsecName, Sec);
 }
 
 void OutputSectionFactory::addInputSec(InputSectionBase *IS,




More information about the llvm-commits mailing list