[llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp

Reid Spencer reid at x10sys.com
Sun Apr 8 12:59:25 PDT 2007



Changes in directory llvm/tools/llvm-ar:

llvm-ar.cpp updated: 1.43 -> 1.44
---
Log message:

Don't rely on destructed local storage. Thanks, Chris.


---
Diffs of the changes:  (+6 -6)

 llvm-ar.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/tools/llvm-ar/llvm-ar.cpp
diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.43 llvm/tools/llvm-ar/llvm-ar.cpp:1.44
--- llvm/tools/llvm-ar/llvm-ar.cpp:1.43	Sat Apr  7 13:53:16 2007
+++ llvm/tools/llvm-ar/llvm-ar.cpp	Sun Apr  8 14:59:07 2007
@@ -281,8 +281,8 @@
     for (std::set<sys::Path>::iterator I = content.begin(), E = content.end();
          I != E; ++I) {
       // Make sure it exists and is a directory
-      const sys::FileStatus *Status =
-        sys::PathWithStatus(*I).getFileStatus(false, ErrMsg);
+      sys::PathWithStatus PwS(*I);
+      const sys::FileStatus *Status = PwS.getFileStatus(false, ErrMsg);
       if (!Status)
         return true;
       if (Status->isDir) {
@@ -310,8 +310,8 @@
       if (!aPath.exists())
         throw std::string("File does not exist: ") + Members[i];
       std::string Err;
-      const sys::FileStatus *si = 
-        sys::PathWithStatus(aPath).getFileStatus(false, &Err);
+      sys::PathWithStatus PwS(aPath);
+      const sys::FileStatus *si = PwS.getFileStatus(false, &Err);
       if (!si)
         throw Err;
       if (si->isDir) {
@@ -647,8 +647,8 @@
 
     if (found != remaining.end()) {
       std::string Err;
-      const sys::FileStatus *si = 
-        sys::PathWithStatus(*found).getFileStatus(false, &Err);
+      sys::PathWithStatus PwS(*found); 
+      const sys::FileStatus *si = PwS.getFileStatus(false, &Err);
       if (!si)
         return true;
       if (si->isDir) {






More information about the llvm-commits mailing list