diff options
Diffstat (limited to 'highlevelilinstruction.cpp')
| -rw-r--r-- | highlevelilinstruction.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/highlevelilinstruction.cpp b/highlevelilinstruction.cpp index d7d1c6aa..e4ad6c7b 100644 --- a/highlevelilinstruction.cpp +++ b/highlevelilinstruction.cpp @@ -20,6 +20,7 @@ #ifdef BINARYNINJACORE_LIBRARY #include "highlevelilfunction.h" +#include "highlevelilssafunction.h" #include "mediumlevelilfunction.h" #include "mediumlevelilssafunction.h" using namespace BinaryNinjaCore; @@ -848,6 +849,38 @@ Confidence<Ref<Type>> HighLevelILInstructionBase::GetType() const } +size_t HighLevelILInstructionBase::GetSSAExprIndex() const +{ + return function->GetSSAExprIndex(exprIndex); +} + + +size_t HighLevelILInstructionBase::GetNonSSAExprIndex() const +{ + return function->GetNonSSAExprIndex(exprIndex); +} + + +HighLevelILInstruction HighLevelILInstructionBase::GetSSAForm() const +{ + Ref<HighLevelILFunction> ssa = function->GetSSAForm().GetPtr(); + if (!ssa) + return *this; + size_t expr = GetSSAExprIndex(); + return ssa->GetExpr(expr); +} + + +HighLevelILInstruction HighLevelILInstructionBase::GetNonSSAForm() const +{ + Ref<HighLevelILFunction> nonSsa = function->GetNonSSAForm(); + if (!nonSsa) + return *this; + size_t expr = GetNonSSAExprIndex(); + return nonSsa->GetExpr(expr); +} + + size_t HighLevelILInstructionBase::GetMediumLevelILExprIndex() const { return function->GetMediumLevelILExprIndex(exprIndex); |
