From a41634e307caa823b1e050eb8b4f67fdf4b8e415 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 12 Aug 2011 14:54:45 +0000 Subject: Silence a bunch (but not all) "variable written but not read" warnings when building with assertions disabled. llvm-svn: 137460 --- llvm/tools/llvm-diff/DifferenceEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/tools/llvm-diff/DifferenceEngine.cpp') diff --git a/llvm/tools/llvm-diff/DifferenceEngine.cpp b/llvm/tools/llvm-diff/DifferenceEngine.cpp index ba2cec2..b240d8c 100644 --- a/llvm/tools/llvm-diff/DifferenceEngine.cpp +++ b/llvm/tools/llvm-diff/DifferenceEngine.cpp @@ -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, 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 -- cgit v1.1