Changes to fix up the inst_iterator to pass to boost iterator checks. This
[oota-llvm.git] / lib / Transforms / Scalar / InstructionCombining.cpp
index e2607c0c1a89cad4e551b9c9d411c6969cdacc19..92b7f1a39bc719a7c367ff8fadc1463d8f10dc2e 100644 (file)
@@ -2934,7 +2934,10 @@ bool InstCombiner::runOnFunction(Function &F) {
   bool Changed = false;
   TD = &getAnalysis<TargetData>();
 
-  WorkList.insert(WorkList.end(), inst_begin(F), inst_end(F));
+  for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) {
+      WorkList.push_back(&*i);
+  }
+
 
   while (!WorkList.empty()) {
     Instruction *I = WorkList.back();  // Get an instruction from the worklist