summaryrefslogtreecommitdiff
path: root/tools/llvm-diff
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2012-05-19 13:14:30 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2012-05-19 13:14:30 +0000
commitf4c261b1378b0f7aaede3a791f0e05c9ab94ea34 (patch)
tree119b3eebf7c0b9fc17b8c8e2da131a65ec1d01b2 /tools/llvm-diff
parent769237bb92515cc8680538f95dfb2eef76ecadd2 (diff)
downloadllvm-f4c261b1378b0f7aaede3a791f0e05c9ab94ea34.tar.gz
llvm-f4c261b1378b0f7aaede3a791f0e05c9ab94ea34.tar.bz2
llvm-f4c261b1378b0f7aaede3a791f0e05c9ab94ea34.tar.xz
Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new SwitchInst methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-diff')
-rw-r--r--tools/llvm-diff/DifferenceEngine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp
index a5a99f5b9c..0e7815b26b 100644
--- a/tools/llvm-diff/DifferenceEngine.cpp
+++ b/tools/llvm-diff/DifferenceEngine.cpp
@@ -318,15 +318,15 @@ class FunctionDifferenceEngine {
bool Difference = false;
- DenseMap<ConstantInt*,BasicBlock*> LCases;
+ DenseMap<Constant*, BasicBlock*> LCases;
for (SwitchInst::CaseIt I = LI->case_begin(), E = LI->case_end();
I != E; ++I)
- LCases[I.getCaseValue()] = I.getCaseSuccessor();
+ LCases[I.getCaseValueEx()] = I.getCaseSuccessor();
for (SwitchInst::CaseIt I = RI->case_begin(), E = RI->case_end();
I != E; ++I) {
- ConstantInt *CaseValue = I.getCaseValue();
+ ConstantRangesSet CaseValue = I.getCaseValueEx();
BasicBlock *LCase = LCases[CaseValue];
if (LCase) {
if (TryUnify) tryUnify(LCase, I.getCaseSuccessor());
@@ -338,7 +338,7 @@ class FunctionDifferenceEngine {
}
}
if (!Difference)
- for (DenseMap<ConstantInt*,BasicBlock*>::iterator
+ for (DenseMap<Constant*, BasicBlock*>::iterator
I = LCases.begin(), E = LCases.end(); I != E; ++I) {
if (Complain)
Engine.logf("left switch has extra case %l") << I->first;