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

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



Changes in directory llvm/tools/opt:

opt.cpp updated: 1.123 -> 1.124
---
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 -0)

 opt.cpp |    2 ++
 1 files changed, 2 insertions(+)


Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.123 llvm/tools/opt/opt.cpp:1.124
--- llvm/tools/opt/opt.cpp:1.123	Fri Dec  1 15:59:37 2006
+++ llvm/tools/opt/opt.cpp	Tue Dec  5 19:18:01 2006
@@ -22,6 +22,7 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/PassNameParser.h"
 #include "llvm/System/Signals.h"
+#include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PluginLoader.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/Support/SystemUtils.h"
@@ -156,6 +157,7 @@
 // main for opt
 //
 int main(int argc, char **argv) {
+  llvm_shutdown_obj X;  // Call llvm_shutdown() on exit.
   try {
     cl::ParseCommandLineOptions(argc, argv,
       " llvm .bc -> .bc modular optimizer and analysis printer \n");






More information about the llvm-commits mailing list