[llvm] [NFC] update comments from an earlier version of SuffixTree (PR #89800)
Xuan Zhang via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 10:40:08 PDT 2024
https://github.com/xuanzh-meta created https://github.com/llvm/llvm-project/pull/89800
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.
>From 569393346db55f5b4388eda767d2fec82853a6e4 Mon Sep 17 00:00:00 2001
From: Xuan Zhang <xuanzh at meta.com>
Date: Tue, 23 Apr 2024 10:37:24 -0700
Subject: [PATCH] updates comments from an earlier version of SuffixTree
---
llvm/lib/Support/SuffixTree.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 =
More information about the llvm-commits
mailing list