22 std::vector<symbol_exprt> clinit_wrappers_called;
27 if(
const auto code = expr_try_dynamic_cast<codet>(*it))
29 if(code->get_statement() == ID_function_call)
32 const auto callee = expr_try_dynamic_cast<symbol_exprt>(
37 clinit_wrappers_called.push_back(*callee);
46 if(clinit_wrappers_called.empty())
50 std::sort(clinit_wrappers_called.begin(), clinit_wrappers_called.end());
52 std::unique(clinit_wrappers_called.begin(), clinit_wrappers_called.end());
53 clinit_wrappers_called.erase(delete_after, clinit_wrappers_called.end());
57 for(
const auto &callee : clinit_wrappers_called)
66 result.
add(std::move(input));
68 return std::move(result);
A codet representing sequential composition of program statements.
void add(const codet &code)
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,...
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
const code_function_callt & to_code_function_call(const codet &code)