[llvm-commits] [llvm] r110518 - in /llvm/trunk: include/llvm/Support/Timer.h lib/Support/Timer.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 7 06:27:41 PDT 2010
Author: d0k
Date: Sat Aug 7 08:27:41 2010
New Revision: 110518
URL: http://llvm.org/viewvc/llvm-project?rev=110518&view=rev
Log:
Roll back my last two commits, valgrind complains.
Modified:
llvm/trunk/include/llvm/Support/Timer.h
llvm/trunk/lib/Support/Timer.cpp
Modified: llvm/trunk/include/llvm/Support/Timer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Timer.h?rev=110518&r1=110517&r2=110518&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Timer.h (original)
+++ llvm/trunk/include/llvm/Support/Timer.h Sat Aug 7 08:27:41 2010
@@ -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 @@
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
Modified: llvm/trunk/lib/Support/Timer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Timer.cpp?rev=110518&r1=110517&r2=110518&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Timer.cpp (original)
+++ llvm/trunk/lib/Support/Timer.cpp Sat Aug 7 08:27:41 2010
@@ -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::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;
More information about the llvm-commits
mailing list