[Analysis] Modernize CallStackTrie (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 16 Apr 2023 19:12:07 +0000 (12:12 -0700)
committerKazu Hirata <kazu@google.com>
Sun, 16 Apr 2023 19:12:08 +0000 (12:12 -0700)
Identified with modernize-use-default-member-init.

llvm/include/llvm/Analysis/MemoryProfileInfo.h

index 51fc6e0..9a97c76 100644 (file)
@@ -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; }