[PATCH] D15619: [Support] Make llvm::Timer reusable

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 15:51:21 PST 2015


vsk marked 2 inline comments as done.
vsk added a comment.

Thanks Rafael. Comments inline, updated diff coming --


================
Comment at: lib/Support/Timer.cpp:142
@@ -141,3 +137,1 @@
 
-static ManagedStatic<std::vector<Timer*> > ActiveTimers;
-
----------------
rafael wrote:
> Deleting this is a nice independent cleanup. Please commit and rebase. Looks like it is dead since 99841.
This still prevents us from doing:

  T.startTimer()
  T.stopTimer()
  T.stopTimer()

So I don't think it's dead.

================
Comment at: lib/Support/Timer.cpp:147
@@ -151,1 +146,3 @@
+  Started = false;
   Time += TimeRecord::getCurrentTime(false);
+  Time -= StartTime;
----------------
rafael wrote:
> These two lines are just:
> 
> += (TimeRecord::getCurrentTime(false) - StartTime);
There is no `operator-` for `TimeRecord`. Should we have one, and if so, is that a separate commit?


http://reviews.llvm.org/D15619





More information about the llvm-commits mailing list