Skip to content

Commit 57c5274

Browse files
tautschnigjeannielynnmoulton
authored andcommitted
Inline single use of compute_address_taken_in_symbols
This avoids multiple variable shadowing and just overall shortens the code.
1 parent d76ca58 commit 57c5274

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/goto-programs/remove_function_pointers.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,6 @@ class remove_function_pointerst:public messaget
9898
void fix_return_type(
9999
code_function_callt &function_call,
100100
goto_programt &dest);
101-
102-
void
103-
compute_address_taken_in_symbols(std::unordered_set<irep_idt> &address_taken)
104-
{
105-
const symbol_tablet &symbol_table=ns.get_symbol_table();
106-
107-
for(const auto &s : symbol_table.symbols)
108-
compute_address_taken_functions(s.second.value, address_taken);
109-
}
110101
};
111102

112103
remove_function_pointerst::remove_function_pointerst(
@@ -120,7 +111,9 @@ remove_function_pointerst::remove_function_pointerst(
120111
add_safety_assertion(_add_safety_assertion),
121112
only_resolve_const_fps(only_resolve_const_fps)
122113
{
123-
compute_address_taken_in_symbols(address_taken);
114+
for(const auto &s : symbol_table.symbols)
115+
compute_address_taken_functions(s.second.value, address_taken);
116+
124117
compute_address_taken_functions(goto_functions, address_taken);
125118

126119
// build type map

0 commit comments

Comments
 (0)