[llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp

Reid Spencer reid at x10sys.com
Fri Jul 8 09:49:04 PDT 2005



Changes in directory llvm/tools/gccld:

GenerateCode.cpp updated: 1.49 -> 1.50
---
Log message:

Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false".


---
Diffs of the changes:  (+12 -1)

 GenerateCode.cpp |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)


Index: llvm/tools/gccld/GenerateCode.cpp
diff -u llvm/tools/gccld/GenerateCode.cpp:1.49 llvm/tools/gccld/GenerateCode.cpp:1.50
--- llvm/tools/gccld/GenerateCode.cpp:1.49	Thu Jul  7 18:21:43 2005
+++ llvm/tools/gccld/GenerateCode.cpp	Fri Jul  8 11:48:52 2005
@@ -154,9 +154,20 @@
 
   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;






More information about the llvm-commits mailing list