[llvm] [NFC] update comments from an earlier version of SuffixTree (PR #89800)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 10:41:00 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Xuan Zhang (xuanzh-meta)

<details>
<summary>Changes</summary>

LeafChildren is used in an earlier version of the SuffixTree implementation to keep track of each nodes' leaf nodes. In the new/current version, this variable is no longer used, but a comment is left behind. This patch updates the comment.

---
Full diff: https://github.com/llvm/llvm-project/pull/89800.diff


1 Files Affected:

- (modified) llvm/lib/Support/SuffixTree.cpp (+2-2) 


``````````diff
diff --git a/llvm/lib/Support/SuffixTree.cpp b/llvm/lib/Support/SuffixTree.cpp
index eaa653078e0900..c00c7989d1a64e 100644
--- a/llvm/lib/Support/SuffixTree.cpp
+++ b/llvm/lib/Support/SuffixTree.cpp
@@ -242,8 +242,8 @@ void SuffixTree::RepeatedSubstringIterator::advance() {
     unsigned Length = Curr->getConcatLen();
 
     // Iterate over each child, saving internal nodes for visiting, and
-    // leaf nodes in LeafChildren. Internal nodes represent individual
-    // strings, which may repeat.
+    // leaf nodes' SuffixIdx in RepeatedSubstringStarts. Internal nodes
+    // represent individual strings, which may repeat.
     for (auto &ChildPair : Curr->Children) {
       // Save all of this node's children for processing.
       if (auto *InternalChild =

``````````

</details>


https://github.com/llvm/llvm-project/pull/89800


More information about the llvm-commits mailing list