diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-08-07 13:07:57 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-08-07 13:07:57 +0000 |
commit | 0055fac7243626a7526c0f0823776e4b82ebd034 (patch) | |
tree | 33e99ef0189223361ddfd6ce52677ebcae556fd7 /include/llvm/Support/Timer.h | |
parent | 933b16e665fba5b29fd83e762390f23c2eaf77db (diff) | |
download | llvm-0055fac7243626a7526c0f0823776e4b82ebd034.tar.gz llvm-0055fac7243626a7526c0f0823776e4b82ebd034.tar.bz2 llvm-0055fac7243626a7526c0f0823776e4b82ebd034.tar.xz |
A reference to the Timer's name is safe, it outlives the contents of the vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Timer.h')
-rw-r--r-- | include/llvm/Support/Timer.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h index f959136f86..a5a33ba324 100644 --- a/include/llvm/Support/Timer.h +++ b/include/llvm/Support/Timer.h @@ -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 @@ struct NamedRegionTimer : public TimeRegion { 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 |