make statistics and timing info print even if the JIT'd program calls exit
authorChris Lattner <sabre@nondot.org>
Sun, 10 Dec 2006 19:01:52 +0000 (19:01 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Dec 2006 19:01:52 +0000 (19:01 +0000)
instead of returning from main.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32414 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lli/lli.cpp

index cce47fb7a2e81f4147b330355fdf2e0c36fe97d1..149536af1b66c0f599571184a769357b7a3d19ca 100644 (file)
@@ -57,7 +57,7 @@ namespace {
 // main Driver function
 //
 int main(int argc, char **argv, char * const *envp) {
-  llvm_shutdown_obj X;  // Call llvm_shutdown() on exit.
+  atexit(llvm_shutdown);  // Call llvm_shutdown() on exit.
   try {
     cl::ParseCommandLineOptions(argc, argv,
                                 " llvm interpreter & dynamic compiler\n");