Roll back my last two commits, valgrind complains.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 7 Aug 2010 13:27:41 +0000 (13:27 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 7 Aug 2010 13:27:41 +0000 (13:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110518 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Timer.h
lib/Support/Timer.cpp

index a5a33ba32405c6034bfea457a5bc23186eaa22f6..f959136f86a03b8a661a73fc7a8a996bd211077a 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/System/DataTypes.h"
 #include "llvm/ADT/StringRef.h"
 #include <cassert>
+#include <string>
 #include <vector>
 #include <utility>
 
@@ -164,7 +165,7 @@ struct NamedRegionTimer : public TimeRegion {
 class TimerGroup {
   std::string Name;
   Timer *FirstTimer;   // First timer in the group.
-  std::vector<std::pair<TimeRecord, StringRef> > TimersToPrint;
+  std::vector<std::pair<TimeRecord, std::string> > TimersToPrint;
   
   TimerGroup **Prev, *Next; // Doubly linked list of TimerGroup's.
   TimerGroup(const TimerGroup &TG);      // DO NOT IMPLEMENT
index bf4595484981e9dcaa92337fd5ac5ca31218e35f..44ee1777cb574b0215f849e07c55bb574c41ada7 100644 (file)
@@ -20,7 +20,6 @@
 #include "llvm/System/Mutex.h"
 #include "llvm/System/Process.h"
 #include "llvm/ADT/OwningPtr.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringMap.h"
 using namespace llvm;
 
@@ -316,8 +315,8 @@ void TimerGroup::addTimer(Timer &T) {
 
 void TimerGroup::PrintQueuedTimers(raw_ostream &OS) {
   // Sort the timers in descending order by amount of time taken.
-  array_pod_sort(TimersToPrint.begin(), TimersToPrint.end());
-
+  std::sort(TimersToPrint.begin(), TimersToPrint.end());
+  
   TimeRecord Total;
   for (unsigned i = 0, e = TimersToPrint.size(); i != e; ++i)
     Total += TimersToPrint[i].first;