[llvm-commits] [llvm] r110517 - /llvm/trunk/include/llvm/Support/Timer.h
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 7 06:07:57 PDT 2010
Author: d0k
Date: Sat Aug 7 08:07:57 2010
New Revision: 110517
URL: http://llvm.org/viewvc/llvm-project?rev=110517&view=rev
Log:
A reference to the Timer's name is safe, it outlives the contents of the vector.
Modified:
llvm/trunk/include/llvm/Support/Timer.h
Modified: llvm/trunk/include/llvm/Support/Timer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Timer.h?rev=110517&r1=110516&r2=110517&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Timer.h (original)
+++ llvm/trunk/include/llvm/Support/Timer.h Sat Aug 7 08:07:57 2010
@@ -18,7 +18,6 @@
#include "llvm/System/DataTypes.h"
#include "llvm/ADT/StringRef.h"
#include <cassert>
-#include <string>
#include <vector>
#include <utility>
@@ -165,7 +164,7 @@
class TimerGroup {
std::string Name;
Timer *FirstTimer; // First timer in the group.
- std::vector<std::pair<TimeRecord, std::string> > TimersToPrint;
+ std::vector<std::pair<TimeRecord, StringRef> > TimersToPrint;
TimerGroup **Prev, *Next; // Doubly linked list of TimerGroup's.
TimerGroup(const TimerGroup &TG); // DO NOT IMPLEMENT
More information about the llvm-commits
mailing list