mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-19 18:26:28 +00:00
Remove a redundant syscall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b6ee7f73e5
commit
501d529ccc
@ -119,31 +119,27 @@ static inline sys::Path IsLibrary(const std::string& Name,
|
|||||||
|
|
||||||
sys::Path FullPath(Directory);
|
sys::Path FullPath(Directory);
|
||||||
|
|
||||||
// Make sure the directory actually is a directory in the file system.
|
// Try the libX.a form
|
||||||
if (FullPath.isDirectory())
|
FullPath.appendComponent("lib" + Name);
|
||||||
{
|
FullPath.appendSuffix("a");
|
||||||
// Try the libX.a form
|
if (FullPath.isArchive())
|
||||||
FullPath.appendComponent("lib" + Name);
|
return FullPath;
|
||||||
FullPath.appendSuffix("a");
|
|
||||||
if (FullPath.isArchive())
|
|
||||||
return FullPath;
|
|
||||||
|
|
||||||
// Try the libX.bca form
|
// Try the libX.bca form
|
||||||
FullPath.eraseSuffix();
|
FullPath.eraseSuffix();
|
||||||
FullPath.appendSuffix("bca");
|
FullPath.appendSuffix("bca");
|
||||||
if (FullPath.isArchive())
|
if (FullPath.isArchive())
|
||||||
return FullPath;
|
return FullPath;
|
||||||
|
|
||||||
// Try the libX.so (or .dylib) form
|
// Try the libX.so (or .dylib) form
|
||||||
FullPath.eraseSuffix();
|
FullPath.eraseSuffix();
|
||||||
FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
|
FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
|
||||||
if (FullPath.isDynamicLibrary()) // Native shared library?
|
if (FullPath.isDynamicLibrary()) // Native shared library?
|
||||||
return FullPath;
|
return FullPath;
|
||||||
if (FullPath.isBytecodeFile()) // .so file containing bytecode?
|
if (FullPath.isBytecodeFile()) // .so file containing bytecode?
|
||||||
return FullPath;
|
return FullPath;
|
||||||
|
|
||||||
// Not found .. fall through
|
// Not found .. fall through
|
||||||
}
|
|
||||||
|
|
||||||
// Indicate that the library was not found in the directory.
|
// Indicate that the library was not found in the directory.
|
||||||
FullPath.clear();
|
FullPath.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user