Subzero: Allow builds with assertions disabled. 1. Setting command-line make variable NOASSERT=1 adds -DNDEBUG and builds in a separate directory. By default, we still get Release+Asserts. 2. Add "(void)foo;" as necessary when foo is only used in an assert(), to remove warnings. 3. Minimize inclusion of llvm/Support/Timer.h because it adds warnings. 4. Call validateLiveness() only when asserts are enabled, because it's relatively expensive. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/623493002
diff --git a/src/IceTimerTree.h b/src/IceTimerTree.h index 3162587..114cc6f 100644 --- a/src/IceTimerTree.h +++ b/src/IceTimerTree.h
@@ -50,10 +50,7 @@ private: void update(); - static double timestamp() { - // TODO: Implement in terms of std::chrono for C++11. - return llvm::TimeRecord::getCurrentTime(false).getWallTime(); - } + static double timestamp(); const double FirstTimestamp; double LastTimestamp; uint64_t StateChangeCount;