mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[MachineOutliner][NFC] Move yet another std::vector out of a loop
Once again, following the wisdom of the LLVM Programmer's Manual. I think that's enough refactoring for today. :) llvm-svn: 348439
This commit is contained in:
parent
844de8e513
commit
85735eb9b4
@ -519,18 +519,19 @@ public:
|
||||
RS = RepeatedSubstring();
|
||||
N = nullptr;
|
||||
|
||||
// Each leaf node represents a repeat of a string.
|
||||
std::vector<SuffixTreeNode *> LeafChildren;
|
||||
|
||||
// Continue visiting nodes until we find one which repeats more than once.
|
||||
while (!ToVisit.empty()) {
|
||||
SuffixTreeNode *Curr = ToVisit.back();
|
||||
ToVisit.pop_back();
|
||||
LeafChildren.clear();
|
||||
|
||||
// Keep track of the length of the string associated with the node. If
|
||||
// it's too short, we'll quit.
|
||||
unsigned Length = Curr->ConcatLen;
|
||||
|
||||
// Each leaf node represents a repeat of a string.
|
||||
std::vector<SuffixTreeNode *> LeafChildren;
|
||||
|
||||
// Iterate over each child, saving internal nodes for visiting, and
|
||||
// leaf nodes in LeafChildren. Internal nodes represent individual
|
||||
// strings, which may repeat.
|
||||
|
Loading…
Reference in New Issue
Block a user