Remove a redundant syscall.
authorChris Lattner <sabre@nondot.org>
Fri, 28 Jul 2006 22:52:11 +0000 (22:52 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 Jul 2006 22:52:11 +0000 (22:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29405 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/Linker.cpp

index 8b8cddc98054623785895c2bf66c2eb352b94ad1..80b85caaee120ecc8efbbc4298f7f0b0042cf319 100644 (file)
@@ -119,31 +119,27 @@ static inline sys::Path IsLibrary(const std::string& Name,
 
   sys::Path FullPath(Directory);
 
-  // Make sure the directory actually is a directory in the file system.
-  if (FullPath.isDirectory())
-  {
-    // Try the libX.a form
-    FullPath.appendComponent("lib" + Name);
-    FullPath.appendSuffix("a");
-    if (FullPath.isArchive())
-      return FullPath;
-
-    // Try the libX.bca form
-    FullPath.eraseSuffix();
-    FullPath.appendSuffix("bca");
-    if (FullPath.isArchive())
-      return FullPath;
-
-    // Try the libX.so (or .dylib) form
-    FullPath.eraseSuffix();
-    FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
-    if (FullPath.isDynamicLibrary())  // Native shared library?
-      return FullPath;
-    if (FullPath.isBytecodeFile())    // .so file containing bytecode?
-      return FullPath;
-
-    // Not found .. fall through
-  }
+  // Try the libX.a form
+  FullPath.appendComponent("lib" + Name);
+  FullPath.appendSuffix("a");
+  if (FullPath.isArchive())
+    return FullPath;
+
+  // Try the libX.bca form
+  FullPath.eraseSuffix();
+  FullPath.appendSuffix("bca");
+  if (FullPath.isArchive())
+    return FullPath;
+
+  // Try the libX.so (or .dylib) form
+  FullPath.eraseSuffix();
+  FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
+  if (FullPath.isDynamicLibrary())  // Native shared library?
+    return FullPath;
+  if (FullPath.isBytecodeFile())    // .so file containing bytecode?
+    return FullPath;
+
+  // Not found .. fall through
 
   // Indicate that the library was not found in the directory.
   FullPath.clear();