diff --git a/src/interfaces/irdb/STARS_IRDB_Function.cpp b/src/interfaces/irdb/STARS_IRDB_Function.cpp index 0bc3b3bda60b0fad764d04184a5acbf34c46c8a8..84df4eb8ff2a1c29fddcc2bb23def3104960d5f3 100644 --- a/src/interfaces/irdb/STARS_IRDB_Function.cpp +++ b/src/interfaces/irdb/STARS_IRDB_Function.cpp @@ -6,7 +6,7 @@ #include <interfaces/irdb/STARSInstruction.h> #include <interfaces/irdb/STARSInterface.h> #include <irdb-core> -#include <libIRDB-cfg.hpp> +#include <irdb-cfg> //#include <bea_deprecated.hpp> #include <list> @@ -91,17 +91,18 @@ void STARS_IRDB_Function_t::BuildFuncIR(SMPFunction *func) // build cfg - libIRDB::ControlFlowGraph_t cfg(the_func); + auto cfgp=ControlFlowGraph_t::factory (the_func); + auto &cfg=*cfgp; // sort the blocks into any order where the entry block is first. - vector<libIRDB::BasicBlock_t*> sorted_blocks; + vector<BasicBlock_t*> sorted_blocks; - sorted_blocks.push_back(cfg.GetEntry()); - for(auto it=cfg.GetBlocks().begin(); - it!=cfg.GetBlocks().end(); ++it) + sorted_blocks.push_back(cfg.getEntry()); + for(auto it=cfg.getBlocks().begin(); + it!=cfg.getBlocks().end(); ++it) { auto block=*it; - if(cfg.GetEntry() == block) // we did the entry block first. + if(cfg.getEntry() == block) // we did the entry block first. continue; sorted_blocks.push_back(block); } @@ -115,7 +116,7 @@ void STARS_IRDB_Function_t::BuildFuncIR(SMPFunction *func) list<SMPInstr*> block_id_map; block_id_map.clear(); auto block=*block_it; - for(auto insn_it=block->GetInstructions().begin(); insn_it!=block->GetInstructions().end(); ++insn_it) + for(auto insn_it=block->getInstructions().begin(); insn_it!=block->getInstructions().end(); ++insn_it) { auto irdb_insn=*insn_it; // cout<<"Building IR for instruction "<<dec<<irdb_insn->getBaseID()<<":"<<irdb_insn->getDisassembly()<<endl;