aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/Pass.cpp4
-rw-r--r--lib/VMCore/PassManagerT.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp
index c7a80c5556..9283d4071d 100644
--- a/lib/VMCore/Pass.cpp
+++ b/lib/VMCore/Pass.cpp
@@ -99,8 +99,8 @@ void TimingInfo::createTheTimeInfo() {
// 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) {
diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h
index 9753596985..62a340beb8 100644
--- a/lib/VMCore/PassManagerT.h
+++ b/lib/VMCore/PassManagerT.h
@@ -90,9 +90,10 @@ class TimingInfo {
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...