[gold/ThinLTO] Invoke llvm_shutdown when exiting after ThinLTO indexing
authorTeresa Johnson <tejohnson@google.com>
Thu, 19 Apr 2018 16:55:13 +0000 (16:55 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 19 Apr 2018 16:55:13 +0000 (16:55 +0000)
commitaa94393ec538f2d65eb9a419a61937bdc954d01d
tree0a233c6f1f1cb1c22c58cf5ffecfd1342a90520a
parentaded409325feb6f36fdeaf6342dc99844242d102
[gold/ThinLTO] Invoke llvm_shutdown when exiting after ThinLTO indexing

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
llvm/tools/gold/gold-plugin.cpp