@@ -25,15 +25,24 @@ 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 (
29
+ symbol_tablet &_symbol_table,
30
+ goto_functionst &_goto_functions)
31
+ : symbol_table(_symbol_table), goto_functions(_goto_functions)
30
32
{
31
33
}
32
34
33
- void process_function (goto_functionst::goto_functiont &);
35
+ void operator ()()
36
+ {
37
+ for (auto &f : goto_functions.function_map )
38
+ process_function (f.second );
39
+ }
34
40
35
41
protected:
36
42
symbol_tablet &symbol_table;
43
+ goto_functionst &goto_functions;
44
+
45
+ void process_function (goto_functionst::goto_functiont &);
37
46
38
47
void process_instruction (
39
48
goto_programt::instructiont &instruction,
@@ -101,6 +110,13 @@ void remove_asmt::gcc_asm_function_call(
101
110
102
111
symbol_table.add (symbol);
103
112
}
113
+
114
+ if (goto_functions.function_map .find (function_identifier)==
115
+ goto_functions.function_map .end ())
116
+ {
117
+ auto &f = goto_functions.function_map [function_identifier];
118
+ f.type =fkt_type;
119
+ }
104
120
}
105
121
106
122
// / removes assembler
@@ -304,19 +320,11 @@ void remove_asmt::process_function(
304
320
305
321
// / removes assembler
306
322
void remove_asm (
307
- goto_functionst::goto_functiont &goto_function ,
323
+ goto_functionst &goto_functions ,
308
324
symbol_tablet &symbol_table)
309
325
{
310
- remove_asmt rem (symbol_table);
311
- rem.process_function (goto_function);
312
- }
313
-
314
- // / removes assembler
315
- void remove_asm (goto_functionst &goto_functions, symbol_tablet &symbol_table)
316
- {
317
- remove_asmt rem (symbol_table);
318
- for (auto &f : goto_functions.function_map )
319
- rem.process_function (f.second );
326
+ remove_asmt rem (symbol_table, goto_functions);
327
+ rem ();
320
328
}
321
329
322
330
// / removes assembler
0 commit comments