diff options
| author | Peter LaFosse <peter@vector35.com> | 2024-10-21 10:55:45 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2024-10-23 20:37:38 -0400 |
| commit | 9aa54ef6723ad06b019c02c22b574516dca6289b (patch) | |
| tree | e0b420a8a609f4644607cad7f6170cf36ee26771 /highlevelilinstruction.cpp | |
| parent | c446e3acbcb0dc750a840551fa7cb54c184e7acb (diff) | |
Linear view function regions collapse
Update collapse code to support PseudoC
Diffstat (limited to 'highlevelilinstruction.cpp')
| -rw-r--r-- | highlevelilinstruction.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/highlevelilinstruction.cpp b/highlevelilinstruction.cpp index c27e1251..7f764009 100644 --- a/highlevelilinstruction.cpp +++ b/highlevelilinstruction.cpp @@ -2480,6 +2480,25 @@ size_t HighLevelILInstruction::GetDestMemoryVersion() const } +bool HighLevelILInstruction::CanCollapse(int operation) +{ + switch (operation) + { + case HLIL_IF: + case HLIL_WHILE: + case HLIL_WHILE_SSA: + case HLIL_DO_WHILE: + case HLIL_DO_WHILE_SSA: + case HLIL_FOR: + case HLIL_FOR_SSA: + case HLIL_SWITCH: + case HLIL_CASE: + return true; + default: + return false; + } +} + ExprId HighLevelILFunction::Nop(const ILSourceLocation& loc) { return AddExprWithLocation(HLIL_NOP, loc, 0); |
