[PATCH] D67683: [Timers] Fix printing some `-ftime-report` sections twice. Fixes PR40328.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 17 17:04:31 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL372191: [Timers] Fix printing some `-ftime-report` sections twice. Fixes PR40328. (authored by vsapsai, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D67683?vs=220582&id=220590#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D67683

Files:
  cfe/trunk/tools/driver/cc1_main.cpp
  cfe/trunk/tools/driver/cc1as_main.cpp
  cfe/trunk/tools/driver/driver.cpp


Index: cfe/trunk/tools/driver/cc1as_main.cpp
===================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp
+++ cfe/trunk/tools/driver/cc1as_main.cpp
@@ -609,6 +609,7 @@
   // If any timers were active but haven't been destroyed yet, print their
   // results now.
   TimerGroup::printAll(errs());
+  TimerGroup::clearAll();
 
   return !!Failed;
 }
Index: cfe/trunk/tools/driver/driver.cpp
===================================================================
--- cfe/trunk/tools/driver/driver.cpp
+++ cfe/trunk/tools/driver/driver.cpp
@@ -499,6 +499,7 @@
   // If any timers were active but haven't been destroyed yet, print their
   // results now.  This happens in -disable-free mode.
   llvm::TimerGroup::printAll(llvm::errs());
+  llvm::TimerGroup::clearAll();
 
 #ifdef _WIN32
   // Exit status should not be negative on Win32, unless abnormal termination.
Index: cfe/trunk/tools/driver/cc1_main.cpp
===================================================================
--- cfe/trunk/tools/driver/cc1_main.cpp
+++ cfe/trunk/tools/driver/cc1_main.cpp
@@ -253,6 +253,7 @@
   // If any timers were active but haven't been destroyed yet, print their
   // results now.  This happens in -disable-free mode.
   llvm::TimerGroup::printAll(llvm::errs());
+  llvm::TimerGroup::clearAll();
 
   if (llvm::timeTraceProfilerEnabled()) {
     SmallString<128> Path(Clang->getFrontendOpts().OutputFile);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67683.220590.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190918/c2ebf3ae/attachment.bin>


More information about the cfe-commits mailing list