[PATCH] D112880: [TimeProfiler] Reset variable to nullptr

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 31 16:15:42 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0cf624cad7a0: [TimeProfiler] Reset variable to nullptr (authored by smeenai).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112880/new/

https://reviews.llvm.org/D112880

Files:
  llvm/lib/Support/TimeProfiler.cpp


Index: llvm/lib/Support/TimeProfiler.cpp
===================================================================
--- llvm/lib/Support/TimeProfiler.cpp
+++ llvm/lib/Support/TimeProfiler.cpp
@@ -271,6 +271,7 @@
 // Called from main thread.
 void llvm::timeTraceProfilerCleanup() {
   delete TimeTraceProfilerInstance;
+  TimeTraceProfilerInstance = nullptr;
   std::lock_guard<std::mutex> Lock(Mu);
   for (auto *TTP : *ThreadTimeTraceProfilerInstances)
     delete TTP;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112880.383693.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211031/64e9dbfa/attachment.bin>


More information about the llvm-commits mailing list