[PATCH] D36847: [Support] Add reentrant start/stop Timer methods

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 13:33:32 PDT 2017


dblaikie added inline comments.


================
Comment at: unittests/Support/TimerTest.cpp:65-75
+class Recurser {
+public:
+  Timer T;
+  Recurser() : T("RCT1", "RCT1") {}
+  void Recurse(unsigned Depth) {
+    T.startReentrantTimer();
+    if (Depth < 1)
----------------
This seems like an overly general tool given the singular use case - would the test be easier to read if this abstraction weren't used and the operations on the Timer were done directly in the test case? Also possibly testing the state of the Timer after startReentrant has been called but before stopReentrant has been called?


https://reviews.llvm.org/D36847





More information about the llvm-commits mailing list