File tree 3 files changed +16
-1
lines changed 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,11 @@ class goto_model_functiont
86
86
goto_model_functiont (
87
87
journalling_symbol_tablet &symbol_table,
88
88
goto_functionst &goto_functions,
89
+ const irep_idt &function_id,
89
90
goto_functionst::goto_functiont &goto_function):
90
91
symbol_table (symbol_table),
91
92
goto_functions (goto_functions),
93
+ function_id (function_id),
92
94
goto_function (goto_function)
93
95
{
94
96
}
@@ -117,9 +119,17 @@ class goto_model_functiont
117
119
return goto_function;
118
120
}
119
121
122
+ // / Get function id
123
+ // / \return `goto_function`'s name (its key in `goto_functions`)
124
+ const irep_idt &get_function_id ()
125
+ {
126
+ return function_id;
127
+ }
128
+
120
129
private:
121
130
journalling_symbol_tablet &symbol_table;
122
131
goto_functionst &goto_functions;
132
+ irep_idt function_id;
123
133
goto_functionst::goto_functiont &goto_function;
124
134
};
125
135
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class lazy_goto_functions_mapt final
49
49
50
50
typedef
51
51
std::function<void (
52
+ const irep_idt &name,
52
53
goto_functionst::goto_functiont &function,
53
54
journalling_symbol_tablet &function_symbols)>
54
55
post_process_functiont;
@@ -128,7 +129,7 @@ class lazy_goto_functions_mapt final
128
129
if (processed_functions.count (name)==0 )
129
130
{
130
131
// Run function-pass conversions
131
- post_process_function (function, journalling_table);
132
+ post_process_function (name, function, journalling_table);
132
133
// Assign procedure-local location numbers for now
133
134
function.body .compute_location_numbers ();
134
135
processed_functions.insert (name);
Original file line number Diff line number Diff line change @@ -29,12 +29,14 @@ lazy_goto_modelt::lazy_goto_modelt(
29
29
language_files,
30
30
symbol_table,
31
31
[this ] (
32
+ const irep_idt &function_name,
32
33
goto_functionst::goto_functiont &function,
33
34
journalling_symbol_tablet &journalling_symbol_table) -> void
34
35
{
35
36
goto_model_functiont model_function (
36
37
journalling_symbol_table,
37
38
goto_model->goto_functions ,
39
+ function_name,
38
40
function);
39
41
this ->post_process_function (model_function, *this );
40
42
},
@@ -54,12 +56,14 @@ lazy_goto_modelt::lazy_goto_modelt(lazy_goto_modelt &&other)
54
56
language_files,
55
57
symbol_table,
56
58
[this ] (
59
+ const irep_idt &function_name,
57
60
goto_functionst::goto_functiont &function,
58
61
journalling_symbol_tablet &journalling_symbol_table) -> void
59
62
{
60
63
goto_model_functiont model_function (
61
64
journalling_symbol_table,
62
65
goto_model->goto_functions ,
66
+ function_name,
63
67
function);
64
68
this ->post_process_function (model_function, *this );
65
69
},
You can’t perform that action at this time.
0 commit comments