From ad74adbd33c0df4da6a5922f4925234c738eea3a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 16 Apr 2023 12:12:07 -0700 Subject: [PATCH] [Analysis] Modernize CallStackTrie (NFC) Identified with modernize-use-default-member-init. --- llvm/include/llvm/Analysis/MemoryProfileInfo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/Analysis/MemoryProfileInfo.h b/llvm/include/llvm/Analysis/MemoryProfileInfo.h index 51fc6e0..9a97c76 100644 --- a/llvm/include/llvm/Analysis/MemoryProfileInfo.h +++ b/llvm/include/llvm/Analysis/MemoryProfileInfo.h @@ -58,9 +58,9 @@ private: }; // The node for the allocation at the root. - CallStackTrieNode *Alloc; + CallStackTrieNode *Alloc = nullptr; // The allocation's leaf stack id. - uint64_t AllocStackId; + uint64_t AllocStackId = 0; void deleteTrieNode(CallStackTrieNode *Node) { if (!Node) @@ -77,7 +77,7 @@ private: bool CalleeHasAmbiguousCallerContext); public: - CallStackTrie() : Alloc(nullptr), AllocStackId(0) {} + CallStackTrie() = default; ~CallStackTrie() { deleteTrieNode(Alloc); } bool empty() const { return Alloc == nullptr; } -- 2.7.4