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); }