Skip to content

Commit e105fb1

Browse files
Clean-up irep-id emptyness checks in path-symex
1 parent 826a79b commit e105fb1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/path-symex/build_goto_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void build_goto_trace(
105105
const irep_idt &comment=
106106
instruction.source_location.get_comment();
107107

108-
if(comment!=irep_idt())
108+
if(!comment.empty())
109109
trace_step.comment=id2string(comment);
110110
else
111111
trace_step.comment="assertion";

src/path-symex/path_symex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ void path_symext::function_call_rec(
699699
const code_typet::parametert &function_parameter=function_parameters[i];
700700
irep_idt identifier=function_parameter.get_identifier();
701701

702-
if(identifier==irep_idt())
702+
if(identifier.empty())
703703
throw "function_call " + id2string(function_identifier)
704704
+ " no identifier for function parameter";
705705

src/path-symex/path_symex_state_read.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ exprt path_symex_statet::read_symbol_member_index(
407407
else
408408
{
409409
// we do some SSA symbol
410-
if(var_state.ssa_symbol.get_identifier()==irep_idt())
410+
if(var_state.ssa_symbol.get_identifier().empty())
411411
{
412412
// produce one
413413
var_state.ssa_symbol=var_info.ssa_symbol();

src/path-symex/var_map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var_mapt::var_infot &var_mapt::operator()(
2222
const irep_idt &suffix,
2323
const typet &type)
2424
{
25-
assert(symbol!=irep_idt());
25+
assert(!symbol.empty());
2626

2727
std::string full_identifier=
2828
id2string(symbol)+id2string(suffix);

0 commit comments

Comments
 (0)