24 std::vector<symbol_exprt> clinit_wrappers_called;
29 if(
const auto code = expr_try_dynamic_cast<codet>(*it))
31 if(code->get_statement() == ID_function_call)
34 const auto callee = expr_try_dynamic_cast<symbol_exprt>(
39 clinit_wrappers_called.push_back(*callee);
48 if(clinit_wrappers_called.empty())
52 std::sort(clinit_wrappers_called.begin(), clinit_wrappers_called.end());
54 std::unique(clinit_wrappers_called.begin(), clinit_wrappers_called.end());
55 clinit_wrappers_called.erase(delete_after, clinit_wrappers_called.end());
59 for(
const auto &callee : clinit_wrappers_called)
68 result.
add(std::move(input));
70 return std::move(result);
A codet representing sequential composition of program statements.
void add(const codet &code)
goto_instruction_codet representation of a function call statement.
A codet representing a skip statement.
Data structure for representing an arbitrary statement in a program.
depth_iteratort depth_end()
depth_iteratort depth_begin()
void drop_source_location()
Forward depth-first search iterators These iterators' copy operations are expensive,...
const code_function_callt & to_code_function_call(const goto_instruction_codet &code)
bool is_clinit_wrapper_function(const irep_idt &function_id)
Check if function_id is a clinit wrapper.
codet lift_clinit_calls(codet input)
file Static initializer call lifting