@@ -25,15 +25,22 @@ Date: December 2014
25
25
class remove_asmt
26
26
{
27
27
public:
28
- explicit remove_asmt (symbol_tablet &_symbol_table)
29
- : symbol_table(_symbol_table)
28
+ remove_asmt (symbol_tablet &_symbol_table, goto_functionst &_goto_functions )
29
+ : symbol_table(_symbol_table), goto_functions(_goto_functions)
30
30
{
31
31
}
32
32
33
- void process_function (goto_functionst::goto_functiont &);
33
+ void operator ()()
34
+ {
35
+ for (auto &f : goto_functions.function_map )
36
+ process_function (f.second );
37
+ }
34
38
35
39
protected:
36
40
symbol_tablet &symbol_table;
41
+ goto_functionst &goto_functions;
42
+
43
+ void process_function (goto_functionst::goto_functiont &);
37
44
38
45
void process_instruction (
39
46
goto_programt::instructiont &instruction,
@@ -101,6 +108,14 @@ void remove_asmt::gcc_asm_function_call(
101
108
102
109
symbol_table.add (symbol);
103
110
}
111
+
112
+ if (
113
+ goto_functions.function_map .find (function_identifier) ==
114
+ goto_functions.function_map .end ())
115
+ {
116
+ auto &f = goto_functions.function_map [function_identifier];
117
+ f.type = fkt_type;
118
+ }
104
119
}
105
120
106
121
// / removes assembler
@@ -302,21 +317,11 @@ void remove_asmt::process_function(
302
317
remove_skip (goto_function.body );
303
318
}
304
319
305
- // / removes assembler
306
- void remove_asm (
307
- goto_functionst::goto_functiont &goto_function,
308
- symbol_tablet &symbol_table)
309
- {
310
- remove_asmt rem (symbol_table);
311
- rem.process_function (goto_function);
312
- }
313
-
314
320
// / removes assembler
315
321
void remove_asm (goto_functionst &goto_functions, symbol_tablet &symbol_table)
316
322
{
317
- remove_asmt rem (symbol_table);
318
- for (auto &f : goto_functions.function_map )
319
- rem.process_function (f.second );
323
+ remove_asmt rem (symbol_table, goto_functions);
324
+ rem ();
320
325
}
321
326
322
327
// / removes assembler
0 commit comments