Skip to content

Commit 084c037

Browse files
committed
Remove c_new_tmp_symbol
1 parent 4713383 commit 084c037

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

src/ansi-c/c_nondet_symbol_factory.cpp

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,6 @@ Author: Diffblue Ltd.
2222

2323
#include <goto-programs/goto_functions.h>
2424

25-
/// Create a new temporary static symbol
26-
/// \param symbol_table: The symbol table to create the symbol in
27-
/// \param loc: The location to assign to the symbol
28-
/// \param type: The type of symbol to create
29-
/// \param static_lifetime: Whether the symbol should have a static lifetime
30-
/// \param prefix: The prefix to use for the symbol's basename
31-
/// \return Returns a reference to the new symbol
32-
static const symbolt &c_new_tmp_symbol(
33-
symbol_tablet &symbol_table,
34-
const source_locationt &loc,
35-
const typet &type,
36-
const bool static_lifetime,
37-
const std::string &prefix="tmp")
38-
{
39-
symbolt &tmp_symbol = get_fresh_aux_symbol(
40-
type, id2string(loc.get_function()), prefix, loc, ID_C, symbol_table);
41-
tmp_symbol.is_static_lifetime=static_lifetime;
42-
43-
return tmp_symbol;
44-
}
45-
4625
class symbol_factoryt
4726
{
4827
std::vector<const symbolt *> &symbols_created;
@@ -87,12 +66,14 @@ exprt symbol_factoryt::allocate_object(
8766
const typet &allocate_type,
8867
const bool static_lifetime)
8968
{
90-
const symbolt &aux_symbol=
91-
c_new_tmp_symbol(
92-
symbol_table,
93-
loc,
94-
allocate_type,
95-
static_lifetime);
69+
symbolt &aux_symbol = get_fresh_aux_symbol(
70+
allocate_type,
71+
id2string(loc.get_function()),
72+
"tmp",
73+
loc,
74+
ID_C,
75+
symbol_table);
76+
aux_symbol.is_static_lifetime = static_lifetime;
9677
symbols_created.push_back(&aux_symbol);
9778

9879
const typet &allocate_type_resolved=ns.follow(allocate_type);

0 commit comments

Comments
 (0)