Stop using "reverse depth first" order
authorChris Lattner <sabre@nondot.org>
Mon, 13 Oct 2003 15:21:58 +0000 (15:21 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 13 Oct 2003 15:21:58 +0000 (15:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9081 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/SlotCalculator.cpp
lib/VMCore/SlotCalculator.cpp

index 47191ce72b2246c2c643d5c717b76117a87bb474..0941b7607b3af149c2b49e203bb707024674480b 100644 (file)
@@ -277,13 +277,10 @@ int SlotCalculator::insertVal(const Value *D, bool dontIgnore) {
               ResultSlot << "\n");
     }
 
-    // Loop over any contained types in the definition... in reverse depth first
-    // order.  This assures that all of the leafs of a type are output before
-    // the type itself is. This also assures us that we will not hit infinite
-    // recursion on recursive types...
+    // Loop over any contained types in the definition... in depth first order.
     //
-    for (df_iterator<const Type*> I = df_begin(TheTy, true), 
-                                  E = df_end(TheTy); I != E; ++I)
+    for (df_iterator<const Type*> I = df_begin(TheTy), E = df_end(TheTy);
+         I != E; ++I)
       if (*I != TheTy) {
        // If we haven't seen this sub type before, add it to our type table!
        const Type *SubTy = *I;
index 47191ce72b2246c2c643d5c717b76117a87bb474..0941b7607b3af149c2b49e203bb707024674480b 100644 (file)
@@ -277,13 +277,10 @@ int SlotCalculator::insertVal(const Value *D, bool dontIgnore) {
               ResultSlot << "\n");
     }
 
-    // Loop over any contained types in the definition... in reverse depth first
-    // order.  This assures that all of the leafs of a type are output before
-    // the type itself is. This also assures us that we will not hit infinite
-    // recursion on recursive types...
+    // Loop over any contained types in the definition... in depth first order.
     //
-    for (df_iterator<const Type*> I = df_begin(TheTy, true), 
-                                  E = df_end(TheTy); I != E; ++I)
+    for (df_iterator<const Type*> I = df_begin(TheTy), E = df_end(TheTy);
+         I != E; ++I)
       if (*I != TheTy) {
        // If we haven't seen this sub type before, add it to our type table!
        const Type *SubTy = *I;