From e740cb1d75aac413651b81fe97e823d12de595b6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 16 Apr 2023 11:40:32 -0700 Subject: [PATCH] [Support] Modernize TimeRecord (NFC) Identified with modernize-use-default-member-init. --- llvm/include/llvm/Support/Timer.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/Support/Timer.h b/llvm/include/llvm/Support/Timer.h index d72af35..1a32832 100644 --- a/llvm/include/llvm/Support/Timer.h +++ b/llvm/include/llvm/Support/Timer.h @@ -23,15 +23,13 @@ class TimerGroup; class raw_ostream; class TimeRecord { - double WallTime; ///< Wall clock time elapsed in seconds. - double UserTime; ///< User time elapsed. - double SystemTime; ///< System time elapsed. - ssize_t MemUsed; ///< Memory allocated (in bytes). - uint64_t InstructionsExecuted; ///< Number of instructions executed + double WallTime = 0.0; ///< Wall clock time elapsed in seconds. + double UserTime = 0.0; ///< User time elapsed. + double SystemTime = 0.0; ///< System time elapsed. + ssize_t MemUsed = 0; ///< Memory allocated (in bytes). + uint64_t InstructionsExecuted = 0; ///< Number of instructions executed public: - TimeRecord() - : WallTime(0), UserTime(0), SystemTime(0), MemUsed(0), - InstructionsExecuted(0) {} + TimeRecord() = default; /// Get the current time and memory usage. If Start is true we get the memory /// usage before the time, otherwise we get time before memory usage. This -- 2.7.4