[lld] r267358 - [ELF] Reinstate 'else' which was previously removed.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 24 11:23:21 PDT 2016


Author: davide
Date: Sun Apr 24 13:23:21 2016
New Revision: 267358

URL: http://llvm.org/viewvc/llvm-project?rev=267358&view=rev
Log:
[ELF] Reinstate 'else' which was previously removed.

It turns out it's actually needed.

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=267358&r1=267357&r2=267358&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Sun Apr 24 13:23:21 2016
@@ -151,7 +151,8 @@ void LinkerDriver::addLibrary(StringRef
   std::string Path = searchLibrary(Name);
   if (Path.empty())
     error("unable to find library -l" + Name);
-  addFile(Path);
+  else
+    addFile(Path);
 }
 
 // This function is called on startup. We need this for LTO since




More information about the llvm-commits mailing list