static dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32411
91177308-0d34-0410-b5e6-
96231b3b80d8
// Constructed the first time this is called, iff -time-passes is enabled.
// This guarantees that the object will be constructed before static globals,
// thus it will be destroyed before them.
- static TimingInfo TTI;
- TheTimeInfo = &TTI;
+ static ManagedStatic<TimingInfo> TTI;
+ TheTimeInfo = &*TTI;
}
void PMDebug::PrintArgumentInformation(const Pass *P) {
std::map<Pass*, Timer> TimingData;
TimerGroup TG;
- // Private ctor, must use 'create' member
- TimingInfo() : TG("... Pass execution timing report ...") {}
public:
+ // Use 'create' member to get this.
+ TimingInfo() : TG("... Pass execution timing report ...") {}
+
// TimingDtor - Print out information about timing information
~TimingInfo() {
// Delete all of the timers...