Silence a bunch (but not all) "variable written but not read" warnings
[oota-llvm.git] / tools / llvm-diff / DifferenceEngine.cpp
index ba2cec2992554bbd942207b283658bb115fc9394..b240d8c5da5d1f452b0ad6630b015df9554026ee 100644 (file)
@@ -195,12 +195,12 @@ class FunctionDifferenceEngine {
     DifferenceEngine::Context C(Engine, L, R);
 
     BasicBlock::iterator LI = L->begin(), LE = L->end();
-    BasicBlock::iterator RI = R->begin(), RE = R->end();
+    BasicBlock::iterator RI = R->begin();
 
     llvm::SmallVector<std::pair<Instruction*,Instruction*>, 20> TentativePairs;
 
     do {
-      assert(LI != LE && RI != RE);
+      assert(LI != LE && RI != R->end());
       Instruction *LeftI = &*LI, *RightI = &*RI;
 
       // If the instructions differ, start the more sophisticated diff