@@ -22,27 +22,6 @@ Author: Diffblue Ltd.
22
22
23
23
#include < goto-programs/goto_functions.h>
24
24
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
-
46
25
class symbol_factoryt
47
26
{
48
27
std::vector<const symbolt *> &symbols_created;
@@ -87,12 +66,14 @@ exprt symbol_factoryt::allocate_object(
87
66
const typet &allocate_type,
88
67
const bool static_lifetime)
89
68
{
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;
96
77
symbols_created.push_back (&aux_symbol);
97
78
98
79
const typet &allocate_type_resolved=ns.follow (allocate_type);
0 commit comments