|
23 | 23 | #include <util/rational.h>
|
24 | 24 | #include <util/rational_tools.h>
|
25 | 25 | #include <util/simplify_expr.h>
|
26 |
| -#include <util/symbol_table_base.h> |
27 | 26 |
|
28 | 27 | #include <langapi/language_util.h>
|
29 | 28 |
|
@@ -1378,23 +1377,17 @@ void goto_convertt::do_function_call_symbol(
|
1378 | 1377 | // append d or f for double/float
|
1379 | 1378 | name+=use_double?'d':'f';
|
1380 | 1379 |
|
| 1380 | + DATA_INVARIANT( |
| 1381 | + ns.lookup(name).type == f_type, |
| 1382 | + "builtin declaration should match constructed type"); |
| 1383 | + |
1381 | 1384 | symbol_exprt new_function=function;
|
1382 | 1385 | new_function.set_identifier(name);
|
1383 | 1386 | new_function.type()=f_type;
|
1384 | 1387 |
|
1385 | 1388 | code_function_callt function_call(lhs, new_function, new_arguments);
|
1386 | 1389 | function_call.add_source_location()=function.source_location();
|
1387 | 1390 |
|
1388 |
| - if(!symbol_table.has_symbol(name)) |
1389 |
| - { |
1390 |
| - symbolt new_symbol; |
1391 |
| - new_symbol.base_name=name; |
1392 |
| - new_symbol.name=name; |
1393 |
| - new_symbol.type=f_type; |
1394 |
| - new_symbol.location=function.source_location(); |
1395 |
| - symbol_table.add(new_symbol); |
1396 |
| - } |
1397 |
| - |
1398 | 1391 | copy(function_call, FUNCTION_CALL, dest);
|
1399 | 1392 | }
|
1400 | 1393 | else if(
|
|
0 commit comments