[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp llvm2cpp.cpp
Chris Lattner
sabre at nondot.org
Tue Dec 5 17:18:54 PST 2006
Changes in directory llvm/tools/llvm2cpp:
CppWriter.cpp updated: 1.22 -> 1.23
llvm2cpp.cpp updated: 1.5 -> 1.6
---
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: (+5 -2)
CppWriter.cpp | 5 +++--
llvm2cpp.cpp | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.22 llvm/tools/llvm2cpp/CppWriter.cpp:1.23
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.22 Sun Nov 26 19:05:10 2006
+++ llvm/tools/llvm2cpp/CppWriter.cpp Tue Dec 5 19:18:01 2006
@@ -20,11 +20,12 @@
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
-#include "llvm/Support/CFG.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/STLExtras.h"
-#include "llvm/Support/MathExtras.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/CFG.h"
+#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/MathExtras.h"
#include "llvm/Config/config.h"
#include <algorithm>
#include <iostream>
Index: llvm/tools/llvm2cpp/llvm2cpp.cpp
diff -u llvm/tools/llvm2cpp/llvm2cpp.cpp:1.5 llvm/tools/llvm2cpp/llvm2cpp.cpp:1.6
--- llvm/tools/llvm2cpp/llvm2cpp.cpp:1.5 Thu Jul 6 18:48:57 2006
+++ llvm/tools/llvm2cpp/llvm2cpp.cpp Tue Dec 5 19:18:01 2006
@@ -20,6 +20,7 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/SystemUtils.h"
#include "llvm/System/Signals.h"
#include "CppWriter.h"
@@ -41,6 +42,7 @@
Force("f", cl::desc("Overwrite output files"));
int main(int argc, char **argv) {
+ llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .cpp assembler\n");
sys::PrintStackTraceOnErrorSignal();
More information about the llvm-commits
mailing list