mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user