disassemble();
}
+LLVMDisassembler::~LLVMDisassembler() {
+ std::for_each(functions.begin(), functions.end(),
+ [](std::pair<uint64_t,LLVMFunction*> it) {
+ delete it.second;
+ });
+ std::for_each(blocks.begin(), blocks.end(),
+ [](std::pair<uint64_t, LLVMBasicBlock*> it) {
+ delete it.second;
+ });
+}
void LLVMDisassembler::disassemble() {
std::stack<LLVMFunction*> remaining_functions;
#include "disassembler/BasicBlock.hxx"
#include "disassembler/Function.hxx"
#include "disassembler/llvm/LLVMBasicBlock.hxx"
+#include "disassembler/llvm/LLVMFunction.hxx"
class LLVMDisassembler
: public Disassembler {
public:
LLVMDisassembler(const std::string& filename);
- virtual ~LLVMDisassembler() {};
+ virtual ~LLVMDisassembler();
void getSymbols();
uint64_t entryAddress();