mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 17:58:22 +00:00
Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22360 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6371ccbd8d
commit
8f1ac1c631
@ -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