summaryrefslogtreecommitdiff
path: root/highlevelilinstruction.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2023-02-20 13:59:48 -0500
committerRusty Wagner <rusty.wagner@gmail.com>2023-02-24 19:11:11 -0500
commitd260db48d05dc38f1a60cedb8633434a7b6237b6 (patch)
tree4fa60beebdf2c504edb577ea19da53b1b8247c48 /highlevelilinstruction.h
parent019a9258c0dced5af53a613479e4b6d13e176b06 (diff)
Refactor VisitExprs to give separate API to gather subexpressions
Diffstat (limited to 'highlevelilinstruction.h')
-rw-r--r--highlevelilinstruction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/highlevelilinstruction.h b/highlevelilinstruction.h
index 19303bdc..502dd582 100644
--- a/highlevelilinstruction.h
+++ b/highlevelilinstruction.h
@@ -155,10 +155,12 @@ namespace BinaryNinja
#ifdef BINARYNINJACORE_LIBRARY
#define _STD_VECTOR vector
#define _STD_SET set
+ #define _STD_STACK stack
#define _STD_UNORDERED_MAP unordered_map
#else
#define _STD_VECTOR std::vector
#define _STD_SET std::set
+ #define _STD_STACK std::stack
#define _STD_UNORDERED_MAP std::unordered_map
#endif
@@ -440,7 +442,10 @@ namespace BinaryNinja
bool asFullAst, size_t instructionIndex);
HighLevelILInstruction(const HighLevelILInstructionBase& instr);
+ void CollectSubExprs(_STD_STACK<size_t>& toProcess) const;
void VisitExprs(const std::function<bool(const HighLevelILInstruction& expr)>& func) const;
+ void VisitExprs(const std::function<bool(const HighLevelILInstruction& expr)>& preFunc,
+ const std::function<void(const HighLevelILInstruction& expr)>& postFunc) const;
ExprId CopyTo(HighLevelILFunction* dest) const;
ExprId CopyTo(HighLevelILFunction* dest,