Return a boolean value directly, instead of returning true if true and false if false.
authorRui Ueyama <ruiu@google.com>
Sat, 24 Jan 2015 02:57:20 +0000 (02:57 +0000)
committerRui Ueyama <ruiu@google.com>
Sat, 24 Jan 2015 02:57:20 +0000 (02:57 +0000)
llvm-svn: 226984

lld/lib/ReaderWriter/ELF/ELFFile.h

index 9b4e8b6..2b86668 100644 (file)
@@ -247,10 +247,8 @@ protected:
   /// Determines if the target wants to create an atom for a section that has no
   /// symbol references.
   bool handleSectionWithNoSymbols(const Elf_Shdr *shdr,
-                                  std::vector<Elf_Sym_Iter> &symbols) const {
-    if (shdr && shdr->sh_type == llvm::ELF::SHT_PROGBITS && symbols.empty())
-      return true;
-    return false;
+                                  std::vector<Elf_Sym_Iter> &syms) const {
+    return shdr && (shdr->sh_type == llvm::ELF::SHT_PROGBITS) && syms.empty();
   }
 
   /// Process the Undefined symbol and create an atom for it.