[clang] [llvm] [llvm][NFC] Rework Timer.cpp globals to ensure valid lifetimes (PR #121663)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 14:50:41 PST 2025


================
@@ -284,18 +250,22 @@ NamedRegionTimer::NamedRegionTimer(StringRef Name, StringRef Description,
 /// ctor/dtor and is protected by the TimerLock lock.
 static TimerGroup *TimerGroupList = nullptr;
 
-TimerGroup::TimerGroup(StringRef Name, StringRef Description)
-  : Name(Name.begin(), Name.end()),
-    Description(Description.begin(), Description.end()) {
+TimerGroup::TimerGroup(StringRef Name, StringRef Description,
+                       sys::SmartMutex<true> &lock)
----------------
macurtis-amd wrote:

Fixed.

https://github.com/llvm/llvm-project/pull/121663


More information about the llvm-commits mailing list