namespace llvm {
class MachineBasicBlock;
+class TargetData;
/// MachineJumpTableEntry - One jump table in the jump table info.
///
return JumpTables;
}
+ /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update
+ /// the jump tables to branch to New instead.
+ void ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {
+ for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) {
+ MachineJumpTableEntry &JTE = JumpTables[i];
+ for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j)
+ if (JTE.MBBs[j] == Old)
+ JTE.MBBs[j] = New;
+ }
+ }
+
/// getEntrySize - returns the size of an individual field in a jump table
unsigned getEntrySize() const;