This is an archive of the discontinued LLVM Phabricator instance.

[gold/ThinLTO] Invoke llvm_shutdown when exiting after ThinLTO indexing
ClosedPublic

Authored by tejohnson on Apr 19 2018, 8:51 AM.

Details

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.

Diff Detail

Event Timeline

tejohnson created this revision.Apr 19 2018, 8:51 AM

BTW confirmed that the test that I added with the 2 lines being removed here fails when I don't have anything here, but passes again with the llvm_shutdown call.

fhahn accepted this revision.Apr 19 2018, 9:55 AM

Nice thanks! LGTM

This revision is now accepted and ready to land.Apr 19 2018, 9:55 AM
This revision was automatically updated to reflect the committed changes.