#pragma once #include "libSage++.h" #include #include #include #include using ResultSet = std::set>; enum class MODE { BEFORE, AFTER }; static std::map> call_sites; template void extract_vars_from_reg(std::set& worklist, SAPFOR::Argument* reg, Iterator instr, Iterator first_instr); template void processArgument(std::set& worklist, SAPFOR::Argument* arg, Iterator instr, Iterator first_instr); void lookup_for_vars(std::set>& where_to_add, std::set& worklist, SAPFOR::Instruction* instr, SAPFOR::BasicBlock* bblock, FuncInfo* cur_func, const std::map>& fullIR); void findParameters(ResultSet& foundParameters, std::map>& fullIR, const std::map, std::pair>& declaredArrays);