[llvm-commits] CVS: llvm/tools/bugpoint/ListReducer.h

Chris Lattner lattner at cs.uiuc.edu
Thu Apr 24 22:17:01 PDT 2003


Changes in directory llvm/tools/bugpoint:

ListReducer.h updated: 1.2 -> 1.3

---
Log message:

Rename Kept -> Suffix
FIX problem where we were incorrectly putting the prefix of the list into the "suffix" list.


---
Diffs of the changes:

Index: llvm/tools/bugpoint/ListReducer.h
diff -u llvm/tools/bugpoint/ListReducer.h:1.2 llvm/tools/bugpoint/ListReducer.h:1.3
--- llvm/tools/bugpoint/ListReducer.h:1.2	Thu Apr 24 17:23:56 2003
+++ llvm/tools/bugpoint/ListReducer.h	Thu Apr 24 22:16:33 2003
@@ -34,14 +34,14 @@
     unsigned MidTop = TheList.size();
     while (MidTop > 1) {
       unsigned Mid = MidTop / 2;
-      std::vector<ElTy> Prefix(TheList.begin()+Mid, TheList.end());
-      std::vector<ElTy> Kept  (TheList.begin(), TheList.begin()+Mid);
+      std::vector<ElTy> Prefix(TheList.begin(), TheList.begin()+Mid);
+      std::vector<ElTy> Suffix(TheList.begin()+Mid, TheList.end());
 
-      switch (doTest(Prefix, Kept)) {
+      switch (doTest(Prefix, Suffix)) {
       case KeepSuffix:
         // The property still holds.  We can just drop the prefix elements, and
         // shorten the list to the "kept" elements.
-        TheList.swap(Kept);
+        TheList.swap(Suffix);
         MidTop = TheList.size();
         break;
       case KeepPrefix:





More information about the llvm-commits mailing list