Add IExplodedBasicBlock.getOriginalNumber()

This method is useful when reasoning about SSAPiStatements, as their
successor block number refers to original basic blocks, not exploded
blocks.
This commit is contained in:
Manu Sridharan 2016-08-10 11:51:13 -07:00
parent 2c9eec0cff
commit e4101510a2
2 changed files with 19 additions and 8 deletions

View File

@ -634,6 +634,11 @@ public class ExplodedControlFlowGraph implements ControlFlowGraph<SSAInstruction
}
return "ExplodedBlock[" + getNumber() + "](original:" + original + ")";
}
@Override
public int getOriginalNumber() {
return original.getNumber();
}
}
@Override

View File

@ -34,4 +34,10 @@ public interface IExplodedBasicBlock extends ISSABasicBlock {
*/
public SSAGetCaughtExceptionInstruction getCatchInstruction();
/**
* get the number of the original basic block containing the instruction of
* this exploded block
*/
public int getOriginalNumber();
}