[lld] r300673 - Fallthrough to reduce code a bit. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 04:31:45 PDT 2017


Author: ruiu
Date: Wed Apr 19 06:31:45 2017
New Revision: 300673

URL: http://llvm.org/viewvc/llvm-project?rev=300673&view=rev
Log:
Fallthrough to reduce code a bit. NFC.

Modified:
    lld/trunk/ELF/Driver.cpp

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=300673&r1=300672&r2=300673&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Wed Apr 19 06:31:45 2017
@@ -568,11 +568,10 @@ static std::vector<StringRef> getLines(M
 static bool getCompressDebugSections(opt::InputArgList &Args) {
   if (auto *Arg = Args.getLastArg(OPT_compress_debug_sections)) {
     StringRef S = Arg->getValue();
-    if (S == "none")
-      return false;
     if (S == "zlib")
       return zlib::isAvailable();
-    error("unknown --compress-debug-sections value: " + S);
+    if (S != "none")
+      error("unknown --compress-debug-sections value: " + S);
   }
   return false;
 }




More information about the llvm-commits mailing list