[PATCH] D45820: [gold/ThinLTO] Invoke llvm_shutdown when exiting after ThinLTO indexing
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 08:52:26 PDT 2018
tejohnson created this revision.
tejohnson added a reviewer: fhahn.
Herald added a subscriber: inglorion.
Instead of manually invoking PrintStatistics, simply invoke
llvm_shutdown which will take care of destroying managed statics, and as
a side effect will destroy the StatisticInfo ManagedStatic, invoking
PrintStatistics when needed.
Repository:
rL LLVM
https://reviews.llvm.org/D45820
Files:
tools/gold/gold-plugin.cpp
Index: tools/gold/gold-plugin.cpp
===================================================================
--- tools/gold/gold-plugin.cpp
+++ tools/gold/gold-plugin.cpp
@@ -1061,8 +1061,7 @@
return LDPS_OK;
if (options::thinlto_index_only) {
- if (llvm::AreStatisticsEnabled())
- llvm::PrintStatistics();
+ llvm_shutdown();
cleanup_hook();
exit(0);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45820.143102.patch
Type: text/x-patch
Size: 380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180419/6a2c4059/attachment.bin>
More information about the llvm-commits
mailing list