r256731 - [TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the support library will be deleted.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 3 20:51:46 PST 2016


Author: ctopper
Date: Sun Jan  3 22:51:46 2016
New Revision: 256731

URL: http://llvm.org/viewvc/llvm-project?rev=256731&view=rev
Log:
[TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the support library will be deleted.

Modified:
    cfe/trunk/utils/TableGen/TableGen.cpp

Modified: cfe/trunk/utils/TableGen/TableGen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/TableGen.cpp?rev=256731&r1=256730&r2=256731&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/TableGen.cpp (original)
+++ cfe/trunk/utils/TableGen/TableGen.cpp Sun Jan  3 22:51:46 2016
@@ -13,6 +13,7 @@
 
 #include "TableGenBackends.h" // Declares all backends.
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/TableGen/Error.h"
@@ -244,6 +245,8 @@ int main(int argc, char **argv) {
   PrettyStackTraceProgram X(argc, argv);
   cl::ParseCommandLineOptions(argc, argv);
 
+  llvm_shutdown_obj Y;
+
   return TableGenMain(argv[0], &ClangTableGenMain);
 }
 




More information about the cfe-commits mailing list