From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/Support/Timer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Support/Timer.cpp') diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index 613d2eaae6d3..c97538cb560a 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/lib/Support/Timer.cpp @@ -247,7 +247,8 @@ TimerGroup::TimerGroup(StringRef Name, StringRef Description, : TimerGroup(Name, Description) { TimersToPrint.reserve(Records.size()); for (const auto &P : Records) - TimersToPrint.emplace_back(P.getValue(), P.getKey(), P.getKey()); + TimersToPrint.emplace_back(P.getValue(), std::string(P.getKey()), + std::string(P.getKey())); assert(TimersToPrint.size() == Records.size() && "Size mismatch"); } @@ -441,3 +442,7 @@ const char *TimerGroup::printAllJSONValues(raw_ostream &OS, const char *delim) { void TimerGroup::ConstructTimerLists() { (void)*NamedGroupedTimers; } + +std::unique_ptr TimerGroup::aquireDefaultGroup() { + return std::unique_ptr(DefaultTimerGroup.claim()); +} -- cgit v1.2.3