diff options
Diffstat (limited to 'tools/llvm-diff/DifferenceEngine.cpp')
-rw-r--r-- | tools/llvm-diff/DifferenceEngine.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp index 4b11315..768b94b 100644 --- a/tools/llvm-diff/DifferenceEngine.cpp +++ b/tools/llvm-diff/DifferenceEngine.cpp @@ -195,8 +195,6 @@ class FunctionDifferenceEngine { BasicBlock::iterator LI = L->begin(), LE = L->end(); BasicBlock::iterator RI = R->begin(); - llvm::SmallVector<std::pair<Instruction*,Instruction*>, 20> TentativePairs; - do { assert(LI != LE && RI != R->end()); Instruction *LeftI = &*LI, *RightI = &*RI; @@ -316,15 +314,15 @@ class FunctionDifferenceEngine { bool Difference = false; - DenseMap<Constant*, BasicBlock*> LCases; + DenseMap<ConstantInt*,BasicBlock*> LCases; for (SwitchInst::CaseIt I = LI->case_begin(), E = LI->case_end(); I != E; ++I) - LCases[I.getCaseValueEx()] = I.getCaseSuccessor(); + LCases[I.getCaseValue()] = I.getCaseSuccessor(); for (SwitchInst::CaseIt I = RI->case_begin(), E = RI->case_end(); I != E; ++I) { - IntegersSubset CaseValue = I.getCaseValueEx(); + ConstantInt *CaseValue = I.getCaseValue(); BasicBlock *LCase = LCases[CaseValue]; if (LCase) { if (TryUnify) tryUnify(LCase, I.getCaseSuccessor()); @@ -336,7 +334,7 @@ class FunctionDifferenceEngine { } } if (!Difference) - for (DenseMap<Constant*, BasicBlock*>::iterator + for (DenseMap<ConstantInt*,BasicBlock*>::iterator I = LCases.begin(), E = LCases.end(); I != E; ++I) { if (Complain) Engine.logf("left switch has extra case %l") << I->first; |