|
14 | 14 | #include "arith_tools.h"
|
15 | 15 | #include "byte_operators.h"
|
16 | 16 | #include "format_type.h"
|
17 |
| -#include "goto_instruction_code.h" |
18 | 17 | #include "ieee_float.h"
|
19 | 18 | #include "mathematical_expr.h"
|
20 | 19 | #include "mp_arith.h"
|
21 | 20 | #include "pointer_expr.h"
|
22 | 21 | #include "prefix.h"
|
23 |
| -#include "std_code.h" |
24 | 22 | #include "string_utils.h"
|
25 | 23 |
|
26 | 24 | #include <map>
|
@@ -425,53 +423,6 @@ void format_expr_configt::setup()
|
425 | 423 | << format(if_expr.false_case()) << ')';
|
426 | 424 | };
|
427 | 425 |
|
428 |
| - expr_map[ID_code] = |
429 |
| - [](std::ostream &os, const exprt &expr) -> std::ostream & { |
430 |
| - const auto &code = to_code(expr); |
431 |
| - const irep_idt &statement = code.get_statement(); |
432 |
| - |
433 |
| - if(statement == ID_assign) |
434 |
| - return os << format(to_code_assign(code).lhs()) << " = " |
435 |
| - << format(to_code_assign(code).rhs()) << ';'; |
436 |
| - else if(statement == ID_block) |
437 |
| - { |
438 |
| - os << '{'; |
439 |
| - for(const auto &s : to_code_block(code).statements()) |
440 |
| - os << ' ' << format(s); |
441 |
| - return os << " }"; |
442 |
| - } |
443 |
| - else if(statement == ID_dead) |
444 |
| - { |
445 |
| - return os << "dead " << format(to_code_dead(code).symbol()) << ";"; |
446 |
| - } |
447 |
| - else if(const auto decl = expr_try_dynamic_cast<code_frontend_declt>(code)) |
448 |
| - { |
449 |
| - const auto &declaration_symb = decl->symbol(); |
450 |
| - os << "decl " << format(declaration_symb.type()) << " " |
451 |
| - << format(declaration_symb); |
452 |
| - if(const optionalt<exprt> initial_value = decl->initial_value()) |
453 |
| - os << " = " << format(*initial_value); |
454 |
| - return os << ";"; |
455 |
| - } |
456 |
| - else if(statement == ID_function_call) |
457 |
| - { |
458 |
| - const auto &func_call = to_code_function_call(code); |
459 |
| - os << to_symbol_expr(func_call.function()).get_identifier() << "("; |
460 |
| - |
461 |
| - // Join all our arguments together. |
462 |
| - join_strings( |
463 |
| - os, |
464 |
| - func_call.arguments().begin(), |
465 |
| - func_call.arguments().end(), |
466 |
| - ", ", |
467 |
| - [](const exprt &expr) { return format(expr); }); |
468 |
| - |
469 |
| - return os << ");"; |
470 |
| - } |
471 |
| - else |
472 |
| - return fallback_format_rec(os, expr); |
473 |
| - }; |
474 |
| - |
475 | 426 | expr_map[ID_string_constant] =
|
476 | 427 | [](std::ostream &os, const exprt &expr) -> std::ostream & {
|
477 | 428 | return os << '"' << expr.get_string(ID_value) << '"';
|
|
0 commit comments