Skip to content

Commit 28579af

Browse files
authored
Merge pull request #4033 from tautschnig/add_var
value_set*: remove unused second parameter of add_var
2 parents ac7867c + 62c3ce5 commit 28579af

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/pointer-analysis/value_set_fi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ void value_set_fit::do_function_call(
12641264
{
12651265
const std::string identifier="value_set::" + id2string(function) + "::" +
12661266
"argument$"+std::to_string(i);
1267-
add_var(identifier, "");
1267+
add_var(identifier);
12681268
const symbol_exprt dummy_lhs(identifier, arguments[i].type());
12691269
assign(dummy_lhs, arguments[i], ns);
12701270
}
@@ -1282,7 +1282,7 @@ void value_set_fit::do_function_call(
12821282
if(identifier.empty())
12831283
continue;
12841284

1285-
add_var(identifier, "");
1285+
add_var(identifier);
12861286

12871287
const exprt v_expr=
12881288
symbol_exprt("value_set::" + id2string(function) + "::" +

src/pointer-analysis/value_set_fi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ class value_set_fit
217217
values.clear();
218218
}
219219

220-
void add_var(const idt &id, const std::string &suffix)
220+
void add_var(const idt &id)
221221
{
222-
get_entry(id, suffix);
222+
get_entry(id, "");
223223
}
224224

225225
void add_var(const entryt &e)

src/pointer-analysis/value_set_fivr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ void value_set_fivrt::do_function_call(
14041404
{
14051405
const std::string identifier="value_set::" + id2string(function) + "::" +
14061406
"argument$"+std::to_string(i);
1407-
add_var(identifier, "");
1407+
add_var(identifier);
14081408
const symbol_exprt dummy_lhs(identifier, arguments[i].type());
14091409

14101410
assign(dummy_lhs, arguments[i], ns, true);
@@ -1429,10 +1429,10 @@ void value_set_fivrt::do_function_call(
14291429
it++)
14301430
{
14311431
const irep_idt &identifier=it->get_identifier();
1432-
if(identifier=="")
1432+
if(identifier.empty())
14331433
continue;
14341434

1435-
add_var(identifier, "");
1435+
add_var(identifier);
14361436

14371437
const exprt v_expr=
14381438
symbol_exprt("value_set::" + id2string(function) + "::" +

src/pointer-analysis/value_set_fivr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ class value_set_fivrt
247247
values.clear();
248248
}
249249

250-
void add_var(const idt &id, const std::string &suffix)
250+
void add_var(const idt &id)
251251
{
252-
get_entry(id, suffix);
252+
get_entry(id, "");
253253
}
254254

255255
void add_var(const entryt &e)

src/pointer-analysis/value_set_fivrns.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ void value_set_fivrnst::do_function_call(
10651065
{
10661066
const std::string identifier="value_set::" + id2string(function) + "::" +
10671067
"argument$"+std::to_string(i);
1068-
add_var(identifier, "");
1068+
add_var(identifier);
10691069
const symbol_exprt dummy_lhs(identifier, arguments[i].type());
10701070

10711071
assign(dummy_lhs, arguments[i], ns, true);
@@ -1090,10 +1090,10 @@ void value_set_fivrnst::do_function_call(
10901090
it++)
10911091
{
10921092
const irep_idt &identifier=it->get_identifier();
1093-
if(identifier=="")
1093+
if(identifier.empty())
10941094
continue;
10951095

1096-
add_var(identifier, "");
1096+
add_var(identifier);
10971097

10981098
const exprt v_expr=
10991099
symbol_exprt("value_set::" + id2string(function) + "::" +
@@ -1114,7 +1114,7 @@ void value_set_fivrnst::do_end_function(
11141114

11151115
irep_idt rvs = std::string("value_set::return_value") +
11161116
std::to_string(from_function);
1117-
add_var(rvs, "");
1117+
add_var(rvs);
11181118
symbol_exprt rhs(rvs, lhs.type());
11191119

11201120
assign(lhs, rhs, ns);
@@ -1187,7 +1187,7 @@ void value_set_fivrnst::apply_code(
11871187
{
11881188
irep_idt rvs = std::string("value_set::return_value") +
11891189
std::to_string(from_function);
1190-
add_var(rvs, "");
1190+
add_var(rvs);
11911191
symbol_exprt lhs(rvs, code.op0().type());
11921192
assign(lhs, code.op0(), ns);
11931193
}

src/pointer-analysis/value_set_fivrns.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ class value_set_fivrnst
239239
values.clear();
240240
}
241241

242-
void add_var(const idt &id, const std::string &suffix)
242+
void add_var(const idt &id)
243243
{
244-
get_entry(id, suffix);
244+
get_entry(id, "");
245245
}
246246

247247
void add_var(const entryt &e)

0 commit comments

Comments
 (0)