Changes in directory llvm/tools/llvm-ar:

llvm-ar.cpp updated: 1.32 -> 1.33
---
Log message:

Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


---
Diffs of the changes:  (+9 -5)

 llvm-ar.cpp |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)


Index: llvm/tools/llvm-ar/llvm-ar.cpp
diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.32 llvm/tools/llvm-ar/llvm-ar.cpp:1.33
--- llvm/tools/llvm-ar/llvm-ar.cpp:1.32 Fri Jul  7 14:09:14 2006
+++ llvm/tools/llvm-ar/llvm-ar.cpp      Fri Jul 28 17:03:44 2006
@@ -299,8 +299,10 @@
     if (checkExistence) {
       if (!aPath.exists())
         throw std::string("File does not exist: ") + Members[i];
-      sys::Path::StatusInfo si;
-      aPath.getStatusInfo(si);
+      sys::FileStatus si;
+      std::string Err;
+      if (aPath.getFileStatus(si, &Err))
+        throw Err;
       if (si.isDir) {
         std::set<sys::Path> dirpaths = recurseDirectories(aPath);
         Paths.insert(dirpaths.begin(),dirpaths.end());
@@ -456,7 +458,7 @@
       // If we're supposed to retain the original modification times, etc. do 
so
       // now.
       if (OriginalDates)
-        I->getPath().setStatusInfoOnDisk(I->getStatusInfo());
+        I->getPath().setStatusInfoOnDisk(I->getFileStatus());
     }
   }
 }
@@ -610,8 +612,10 @@
     }
 
     if (found != remaining.end()) {
-      sys::Path::StatusInfo si;
-      found->getStatusInfo(si);
+      sys::FileStatus si;
+      std::string Err;
+      if (found->getFileStatus(si, &Err))
+        throw Err;
       if (si.isDir) {
         if (OnlyUpdate) {
           // Replace the item only if it is newer.



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to