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

Chris Lattner sabre at nondot.org
Tue Dec 5 17:18:51 PST 2006



Changes in directory llvm/tools/llvm-ar:

llvm-ar.cpp updated: 1.39 -> 1.40
---
Log message:

make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.

With this change, I can now move -stats to print when llvm_shutdown is called.


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

 llvm-ar.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/tools/llvm-ar/llvm-ar.cpp
diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.39 llvm/tools/llvm-ar/llvm-ar.cpp:1.40
--- llvm/tools/llvm-ar/llvm-ar.cpp:1.39	Thu Nov  2 14:25:50 2006
+++ llvm/tools/llvm-ar/llvm-ar.cpp	Tue Dec  5 19:18:00 2006
@@ -16,12 +16,12 @@
 #include "llvm/Bytecode/Archive.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compressor.h"
+#include "llvm/Support/ManagedStatic.h"
 #include "llvm/System/Signals.h"
 #include <iostream>
 #include <algorithm>
 #include <iomanip>
 #include <memory>
-
 using namespace llvm;
 
 // Option for compatibility with ASIX, not used but must allow it to be present.
@@ -696,6 +696,7 @@
 
 // main - main program for llvm-ar .. see comments in the code
 int main(int argc, char **argv) {
+  llvm_shutdown_obj X;  // Call llvm_shutdown() on exit.
 
   // Have the command line options parsed and handle things
   // like --help and --version.






More information about the llvm-commits mailing list