diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-07-08 16:48:52 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-07-08 16:48:52 +0000 |
commit | 8f1ac1c6313e5c1bf754c7131adc7b46d663730a (patch) | |
tree | 0d34744c6331a506f882c900b38594366d7d17ab /tools/gccld | |
parent | 6371ccbd8d3838bdc7ca4f2cc9c807e84ecc93a8 (diff) | |
download | external_llvm-8f1ac1c6313e5c1bf754c7131adc7b46d663730a.zip external_llvm-8f1ac1c6313e5c1bf754c7131adc7b46d663730a.tar.gz external_llvm-8f1ac1c6313e5c1bf754c7131adc7b46d663730a.tar.bz2 |
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
Diffstat (limited to 'tools/gccld')
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index f6a08ce..56aaf7d 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -154,9 +154,20 @@ static bool isBytecodeLPath(const std::string &LibPath) { sys::Path LPath(LibPath); + // Make sure it exists + if (!LPath.exists()) + return isBytecodeLPath; + // Make sure its a directory - if (!LPath.isDirectory()) + try + { + if (!LPath.isDirectory()) + return isBytecodeLPath; + } + catch (std::string& xcptn) + { return isBytecodeLPath; + } // Grab the contents of the -L path std::set<sys::Path> Files; |