Skip to content

Commit c51faad

Browse files
committed
Use StringRef instead of std::string
1 parent 512e459 commit c51faad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/Support/DebugCounter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class DebugCounter {
7676

7777
int64_t Count = 0;
7878
uint64_t CurrChunkIdx = 0;
79-
std::string Name;
80-
std::string Desc;
79+
StringRef Name;
80+
StringRef Desc;
8181
SmallVector<Chunk> Chunks;
8282

8383
public:
@@ -157,7 +157,7 @@ class DebugCounter {
157157
unsigned int getNumCounters() const { return Counters.size(); }
158158

159159
// Return the name and description of the counter with the given info.
160-
std::pair<std::string, std::string> getCounterDesc(CounterInfo *Info) const {
160+
std::pair<StringRef, StringRef> getCounterDesc(CounterInfo *Info) const {
161161
return {Info->Name, Info->Desc};
162162
}
163163

0 commit comments

Comments
 (0)