Skip to content

Commit 8f9aefc

Browse files
author
thk123
committed
Added guard to the output
1 parent 63e0a3e commit 8f9aefc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/goto-programs/show_goto_functions_json.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ json_objectt show_goto_functions_jsont::get_goto_functions(
105105

106106
instruction_entry["operands"]=operand_array;
107107

108+
if(!instruction.guard.is_true())
109+
{
110+
json_objectt guard_object;
111+
no_comments_irep_converter.convert_from_irep(
112+
instruction.guard,
113+
guard_object);
114+
115+
instruction_entry["guard"]=guard_object;
116+
}
117+
108118
json_instruction_array.push_back(instruction_entry);
109119
}
110120

0 commit comments

Comments
 (0)