summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccld/GenerateCode.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-08 16:48:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-08 16:48:52 +0000
commit03f6f7a537a77bf7dd5d9c1eb30a497301ddbe48 (patch)
tree46164a36c718653b22c92ede1c0d6b48e6935d77 /llvm/tools/gccld/GenerateCode.cpp
parentd28e432c361422a570e86ecd043fd6052bc2a119 (diff)
downloadbcm5719-llvm-03f6f7a537a77bf7dd5d9c1eb30a497301ddbe48.tar.gz
bcm5719-llvm-03f6f7a537a77bf7dd5d9c1eb30a497301ddbe48.zip
Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false". llvm-svn: 22360
Diffstat (limited to 'llvm/tools/gccld/GenerateCode.cpp')
-rw-r--r--llvm/tools/gccld/GenerateCode.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp
index f6a08ce8cb0..56aaf7d5cfc 100644
--- a/llvm/tools/gccld/GenerateCode.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud