[lld] r367200 - Return early. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 28 22:24:51 PDT 2019


Author: ruiu
Date: Sun Jul 28 22:24:51 2019
New Revision: 367200

URL: http://llvm.org/viewvc/llvm-project?rev=367200&view=rev
Log:
Return early. NFC.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=367200&r1=367199&r2=367200&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Sun Jul 28 22:24:51 2019
@@ -127,18 +127,18 @@ static bool isCompatible(InputFile *file
 
   if (!config->emulation.empty()) {
     error(toString(file) + " is incompatible with " + config->emulation);
-  } else {
-    InputFile *existing;
-    if (!objectFiles.empty())
-      existing = objectFiles[0];
-    else if (!sharedFiles.empty())
-      existing = sharedFiles[0];
-    else
-      existing = bitcodeFiles[0];
-
-    error(toString(file) + " is incompatible with " + toString(existing));
+    return false;
   }
 
+  InputFile *existing;
+  if (!objectFiles.empty())
+    existing = objectFiles[0];
+  else if (!sharedFiles.empty())
+    existing = sharedFiles[0];
+  else
+    existing = bitcodeFiles[0];
+
+  error(toString(file) + " is incompatible with " + toString(existing));
   return false;
 }
 




More information about the llvm-commits mailing list