mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +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);
|
sys::Path LPath(LibPath);
|
||||||
|
|
||||||
// Make sure its a directory
|
// Make sure it exists
|
||||||
if (!LPath.isDirectory())
|
if (!LPath.exists())
|
||||||
return isBytecodeLPath;
|
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
|
// Grab the contents of the -L path
|
||||||
std::set<sys::Path> Files;
|
std::set<sys::Path> Files;
|
||||||
LPath.getDirectoryContents(Files);
|
LPath.getDirectoryContents(Files);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user