diff options
| author | Ryan Snyder <ryan@vector35.com> | 2018-08-20 18:58:00 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-08-20 18:59:04 -0400 |
| commit | cecb2af5e8ec590500379e4b103531649de4e5a2 (patch) | |
| tree | c214a9910d3f67d94087ba507951b8dd95d4026d /mediumlevelil.cpp | |
| parent | 1e6336e12229add2f1716019d1b050c7f989dbaa (diff) | |
api: add methods to get basic block objects from IL instrs
Diffstat (limited to 'mediumlevelil.cpp')
| -rw-r--r-- | mediumlevelil.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mediumlevelil.cpp b/mediumlevelil.cpp index 1795a54d..cac45dd6 100644 --- a/mediumlevelil.cpp +++ b/mediumlevelil.cpp @@ -404,6 +404,15 @@ vector<Ref<BasicBlock>> MediumLevelILFunction::GetBasicBlocks() const } +Ref<BasicBlock> MediumLevelILFunction::GetBasicBlockForInstruction(size_t i) const +{ + BNBasicBlock* block = BNGetMediumLevelILBasicBlockForInstruction(m_object, i); + if (!block) + return nullptr; + return new BasicBlock(block); +} + + Ref<MediumLevelILFunction> MediumLevelILFunction::GetSSAForm() const { BNMediumLevelILFunction* func = BNGetMediumLevelILSSAForm(m_object); |
