mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Use a SmallPtrSet to dedup successors in EmitSjLjDispatchBlock.
The test case ARM/2011-05-04-MultipleLandingPadSuccs.ll was creating duplicate successor list entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df2598871e
commit
a0708d1109
@ -6151,13 +6151,12 @@ EmitSjLjDispatchBlock(MachineInstr *MI, MachineBasicBlock *MBB) const {
|
||||
}
|
||||
|
||||
// Add the jump table entries as successors to the MBB.
|
||||
MachineBasicBlock *PrevMBB = 0;
|
||||
SmallPtrSet<MachineBasicBlock*, 8> SeenMBBs;
|
||||
for (std::vector<MachineBasicBlock*>::iterator
|
||||
I = LPadList.begin(), E = LPadList.end(); I != E; ++I) {
|
||||
MachineBasicBlock *CurMBB = *I;
|
||||
if (PrevMBB != CurMBB)
|
||||
if (SeenMBBs.insert(CurMBB))
|
||||
DispContBB->addSuccessor(CurMBB);
|
||||
PrevMBB = CurMBB;
|
||||
}
|
||||
|
||||
// N.B. the order the invoke BBs are processed in doesn't matter here.
|
||||
|
Loading…
x
Reference in New Issue
Block a user