Skip to content
Snippets Groups Projects
Commit 83bc9e78 authored by an7s's avatar an7s
Browse files

added LookupAssembly()

Former-commit-id: dd9fc21dfed052ad30cb21e3833364a71379d620
parent afefd319
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,8 @@ class FileIR_t : public BaseObj_t
void AssembleRegistry();
void RegisterAssembly(Instruction_t *instr, std::string assembly);
void UnregisterAssembly(Instruction_t *instr);
std::string LookupAssembly(Instruction_t *instr);
//Needed for inserting assembly before an instruction.
//if orig is not registered, the function returns, otherwise
//the instruction/assembly mapping of orig->assembly is altered to
......
......@@ -195,6 +195,13 @@ void FileIR_t::UnregisterAssembly(Instruction_t *instr)
assembly_registry.erase(instr);
}
std::string FileIR_t::LookupAssembly(Instruction_t *instr)
{
if (assembly_registry.find(instr) != assembly_registry.end())
return assembly_registry[instr];
else
return std::string();
}
std::map<db_id_t,Function_t*> FileIR_t::ReadFuncsFromDB
(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment