Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions src/goto-diff/unified_diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ void unified_difft::get_diff(
new_fit->second.body;

get_diff(
function,
old_goto_program,
new_goto_program,
entry->second,
dest);
}

void unified_difft::get_diff(
const irep_idt &identifier,
const goto_programt &old_goto_program,
const goto_programt &new_goto_program,
const differencest &differences,
Expand Down Expand Up @@ -109,7 +107,6 @@ void unified_difft::output_diff(
{
goto_program_difft diff;
get_diff(
identifier,
old_goto_program,
new_goto_program,
differences,
Expand Down Expand Up @@ -387,15 +384,26 @@ void unified_difft::output(std::ostream &os) const

for(const std::pair<irep_idt, differencest> &p : differences_map)
{
goto_functionst::function_mapt::const_iterator f1=
old_goto_functions.function_map.find(p.first);
goto_functionst::function_mapt::const_iterator f2=
new_goto_functions.function_map.find(p.first);
const irep_idt &function=p.first;

goto_functionst::function_mapt::const_iterator old_fit=
old_goto_functions.function_map.find(function);
goto_functionst::function_mapt::const_iterator new_fit=
new_goto_functions.function_map.find(function);

const goto_programt &old_goto_program=
old_fit==old_goto_functions.function_map.end() ?
empty :
old_fit->second.body;
const goto_programt &new_goto_program=
new_fit==new_goto_functions.function_map.end() ?
empty :
new_fit->second.body;

output_diff(
p.first,
f1==old_goto_functions.function_map.end()?empty:f1->second.body,
f2==new_goto_functions.function_map.end()?empty:f2->second.body,
function,
old_goto_program,
new_goto_program,
p.second,
os);
}
Expand Down
1 change: 0 additions & 1 deletion src/goto-diff/unified_diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class unified_difft
differencest &differences) const;

void get_diff(
const irep_idt &identifier,
const goto_programt &old_goto_program,
const goto_programt &new_goto_program,
const differencest &differences,
Expand Down