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

Reid Spencer reid at x10sys.com
Wed Dec 15 13:58:14 PST 2004



Changes in directory llvm/tools/llvm-ar:

llvm-ar.cpp updated: 1.24 -> 1.25
---
Log message:

Unbreak all archive reading operations introduced by the last patch which 
always exited the program with exit code 1 in these cases, regardless of
whether an error occurred or not.


---
Diffs of the changes:  (+3 -2)

Index: llvm/tools/llvm-ar/llvm-ar.cpp
diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.24 llvm/tools/llvm-ar/llvm-ar.cpp:1.25
--- llvm/tools/llvm-ar/llvm-ar.cpp:1.24	Wed Dec 15 01:44:15 2004
+++ llvm/tools/llvm-ar/llvm-ar.cpp	Wed Dec 15 15:58:03 2004
@@ -679,10 +679,11 @@
     } else {
       std::string Error;
       TheArchive = Archive::OpenAndLoad(ArchivePath, &Error);
-      if (TheArchive == 0)
+      if (TheArchive == 0) {
         std::cerr << argv[0] << ": error loading '" << ArchivePath << "': "
                   << Error << "!\n";
-      return 1;
+        return 1;
+      }
     }
 
     // Make sure we're not fooling ourselves.






More information about the llvm-commits mailing list