summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-diff/DifferenceEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-diff/DifferenceEngine.cpp')
-rw-r--r--llvm/tools/llvm-diff/DifferenceEngine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-diff/DifferenceEngine.cpp b/llvm/tools/llvm-diff/DifferenceEngine.cpp
index e827b23a732..8113fd4c667 100644
--- a/llvm/tools/llvm-diff/DifferenceEngine.cpp
+++ b/llvm/tools/llvm-diff/DifferenceEngine.cpp
@@ -319,13 +319,13 @@ class FunctionDifferenceEngine {
bool Difference = false;
DenseMap<ConstantInt*,BasicBlock*> LCases;
- for (unsigned I = 1, E = LI->getNumCases(); I != E; ++I)
- LCases[LI->getCaseValue(I)] = LI->getSuccessor(I);
- for (unsigned I = 1, E = RI->getNumCases(); I != E; ++I) {
+ for (unsigned I = 0, E = LI->getNumCases(); I != E; ++I)
+ LCases[LI->getCaseValue(I)] = LI->getCaseSuccessor(I);
+ for (unsigned I = 0, E = RI->getNumCases(); I != E; ++I) {
ConstantInt *CaseValue = RI->getCaseValue(I);
BasicBlock *LCase = LCases[CaseValue];
if (LCase) {
- if (TryUnify) tryUnify(LCase, RI->getSuccessor(I));
+ if (TryUnify) tryUnify(LCase, RI->getCaseSuccessor(I));
LCases.erase(CaseValue);
} else if (Complain || !Difference) {
if (Complain)
OpenPOWER on IntegriCloud