From d260db48d05dc38f1a60cedb8633434a7b6237b6 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 20 Feb 2023 13:59:48 -0500 Subject: Refactor VisitExprs to give separate API to gather subexpressions --- highlevelilinstruction.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'highlevelilinstruction.h') 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& toProcess) const; void VisitExprs(const std::function& func) const; + void VisitExprs(const std::function& preFunc, + const std::function& postFunc) const; ExprId CopyTo(HighLevelILFunction* dest) const; ExprId CopyTo(HighLevelILFunction* dest, -- cgit v1.3.1