summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-28 22:52:11 +0000
committerChris Lattner <sabre@nondot.org>2006-07-28 22:52:11 +0000
commite58f7408d086adbcb280f45893e70ce62d3c1b8d (patch)
tree805335864720126616fb907e425f661f8a9275cf /llvm/lib
parent149130ad6bad36ab539ca82a9a61f85edc011037 (diff)
downloadbcm5719-llvm-e58f7408d086adbcb280f45893e70ce62d3c1b8d.tar.gz
bcm5719-llvm-e58f7408d086adbcb280f45893e70ce62d3c1b8d.zip
Remove a redundant syscall.
llvm-svn: 29405
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/Linker.cpp46
1 files changed, 21 insertions, 25 deletions
diff --git a/llvm/lib/Linker/Linker.cpp b/llvm/lib/Linker/Linker.cpp
index 8b8cddc9805..80b85caaee1 100644
--- a/llvm/lib/Linker/Linker.cpp
+++ b/llvm/lib/Linker/Linker.cpp
@@ -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();
OpenPOWER on IntegriCloud