@@ -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;
@@ -51,6 +30,13 @@ class symbol_factoryt
51
30
const bool assume_non_null;
52
31
namespacet ns;
53
32
33
+ const symbolt &c_new_tmp_symbol (
34
+ // symbol_tablet &symbol_table,
35
+ // const source_locationt &loc,
36
+ const typet &type,
37
+ const bool static_lifetime,
38
+ const std::string &prefix = " tmp" );
39
+
54
40
public:
55
41
symbol_factoryt (
56
42
std::vector<const symbolt *> &_symbols_created,
@@ -73,6 +59,27 @@ class symbol_factoryt
73
59
void gen_nondet_init (code_blockt &assignments, const exprt &expr);
74
60
};
75
61
62
+ // / Create a new temporary static symbol
63
+ // / \param symbol_table: The symbol table to create the symbol in
64
+ // / \param loc: The location to assign to the symbol
65
+ // / \param type: The type of symbol to create
66
+ // / \param static_lifetime: Whether the symbol should have a static lifetime
67
+ // / \param prefix: The prefix to use for the symbol's basename
68
+ // / \return Returns a reference to the new symbol
69
+ const symbolt &symbol_factoryt::c_new_tmp_symbol (
70
+ // symbol_tablet &symbol_table,
71
+ // const source_locationt &loc,
72
+ const typet &type,
73
+ const bool static_lifetime,
74
+ const std::string &prefix)
75
+ {
76
+ symbolt &tmp_symbol = get_fresh_aux_symbol (
77
+ type, id2string (loc.get_function ()), prefix, loc, ID_C, symbol_table);
78
+ tmp_symbol.is_static_lifetime = static_lifetime;
79
+
80
+ return tmp_symbol;
81
+ }
82
+
76
83
// / Create a symbol for a pointer to point to
77
84
// / \param assignments: The code block to add code to
78
85
// / \param target_expr: The expression which we are allocating a symbol for
@@ -89,8 +96,6 @@ exprt symbol_factoryt::allocate_object(
89
96
{
90
97
const symbolt &aux_symbol=
91
98
c_new_tmp_symbol (
92
- symbol_table,
93
- loc,
94
99
allocate_type,
95
100
static_lifetime);
96
101
symbols_created.push_back (&aux_symbol);
0 commit comments