OSDN Git Service

Add a fix for LLVM for late versions of clang
authorGreg Hartman <ghartman@google.com>
Thu, 28 May 2015 06:43:16 +0000 (23:43 -0700)
committerGreg Hartman <ghartman@google.com>
Thu, 28 May 2015 19:34:24 +0000 (19:34 +0000)
Change-Id: Id32b0b975af8bdff31c822cf5a67792fe7f785b1
Reviewed-on: https://swiftshader-review.googlesource.com/3301
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
src/LLVM/include/llvm/Analysis/LoopInfo.h

index 12cb6c5..18364a2 100644 (file)
@@ -828,8 +828,10 @@ public:
         typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
 
         // Add all of the predecessors of X to the end of the work stack...
-        TodoStack.insert(TodoStack.end(), InvBlockTraits::child_begin(X),
-                         InvBlockTraits::child_end(X));
+        for (typename InvBlockTraits::ChildIteratorType PI = InvBlockTraits::child_begin(X), PE = InvBlockTraits::child_end(X); PI != PE; ++PI) { 
+          typename InvBlockTraits::NodeType *N = *PI; 
+          TodoStack.push_back(N); 
+        } 
       }
     }