X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-diff%2FDifferenceEngine.cpp;h=b240d8c5da5d1f452b0ad6630b015df9554026ee;hb=adf01b3f18442ae8db6b8948e70d82d9df415119;hp=3cf178e7f169cb9fe6cbf2a30329d60656abdb54;hpb=7d4fc4fb345ee8a1de15c718a854b5f38c1e6e46;p=oota-llvm.git diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp index 3cf178e7f16..b240d8c5da5 100644 --- a/tools/llvm-diff/DifferenceEngine.cpp +++ b/tools/llvm-diff/DifferenceEngine.cpp @@ -14,6 +14,7 @@ #include "DifferenceEngine.h" +#include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Module.h" @@ -194,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 @@ -266,7 +267,7 @@ class FunctionDifferenceEngine { } else if (isa(L)) { // FIXME: implement. - // This is really wierd; type uniquing is broken? + // This is really weird; type uniquing is broken? if (L->getType() != R->getType()) { if (!L->getType()->isPointerTy() || !R->getType()->isPointerTy()) { if (Complain) Engine.log("different phi types");