branchInstruction.setTarget(target);
}
if (branchInstruction instanceof InstructionSelect) {
// Either LOOKUPSWITCH or TABLESWITCH
InstructionSelect iSelect = (InstructionSelect) branchInstruction;
InstructionHandle[] targets = iSelect.getTargets();
for (int k = targets.length - 1; k >= 0; k--) {
InstructionHandle oneTarget = targets[k];
if (handlesForDeletion.contains(oneTarget)) {
do {
oneTarget = oneTarget.getNext();
} while (handlesForDeletion.contains(oneTarget));
iSelect.setTarget(k, oneTarget);
oneTarget.addTargeter(branchInstruction);
}
}
}
}