]> granicus.if.org Git - clang/commitdiff
Call llvm_shutdown() on (normal) termination. This makes --time-passes usable.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 28 Oct 2008 00:38:08 +0000 (00:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 28 Oct 2008 00:38:08 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58308 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp

index ac5a4b281a3ef6e7085f5e1f9041c2d422a7e88d..765c05b26d8c5d2a0015f4b034df73fd979f7e99 100644 (file)
@@ -45,6 +45,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Config/config.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/System/Host.h"
 #include "llvm/System/Path.h"
@@ -1534,5 +1535,9 @@ int main(int argc, char **argv) {
   if (VerifyDiagnostics)
     return 0;
 
+  // Managed static deconstruction. Useful for making things like
+  // -time-passes usable.
+  llvm::llvm_shutdown();
+
   return HadErrors || (Diags.getNumErrors() != 0);
 }