mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false". llvm-svn: 22360
This commit is contained in:
parent
6bed5ca433
commit
c38a1c7061
@ -154,10 +154,21 @@ static bool isBytecodeLPath(const std::string &LibPath) {
|
||||
|
||||
sys::Path LPath(LibPath);
|
||||
|
||||
// Make sure its a directory
|
||||
if (!LPath.isDirectory())
|
||||
// Make sure it exists
|
||||
if (!LPath.exists())
|
||||
return isBytecodeLPath;
|
||||
|
||||
// Make sure its a directory
|
||||
try
|
||||
{
|
||||
if (!LPath.isDirectory())
|
||||
return isBytecodeLPath;
|
||||
}
|
||||
catch (std::string& xcptn)
|
||||
{
|
||||
return isBytecodeLPath;
|
||||
}
|
||||
|
||||
// Grab the contents of the -L path
|
||||
std::set<sys::Path> Files;
|
||||
LPath.getDirectoryContents(Files);
|
||||
|
Loading…
Reference in New Issue
Block a user