Summary:
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.
Reviewers: fhahn
Subscribers: inglorion, llvm-commits
Differential Revision: https://reviews.llvm.org/D45820
llvm-svn: 330341
return LDPS_OK;
if (options::thinlto_index_only) {
- if (llvm::AreStatisticsEnabled())
- llvm::PrintStatistics();
+ llvm_shutdown();
cleanup_hook();
exit(0);
}