Skip to content

Commit 071e582

Browse files
committed
Remove build_declaration_stack
1 parent c156894 commit 071e582

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

src/goto-programs/goto_convert.cpp

-41
Original file line numberDiff line numberDiff line change
@@ -93,47 +93,6 @@ static void finish_catch_push_targets(goto_programt &dest)
9393
}
9494
}
9595

96-
goto_programt goto_convertt::build_declaration_stack(
97-
const irep_idt &mode,
98-
node_indext declaration_start_point,
99-
node_indext declaration_end_point)
100-
{
101-
goto_programt declarations;
102-
103-
// As we go we'll keep targets.scope_stack.current_node pointing at the
104-
// next node we intend to declare. if it contains any DECL statements they
105-
// will be added as a new child branch, again at the right point.
106-
107-
const node_indext start_id = declaration_start_point;
108-
const node_indext end_id = declaration_end_point;
109-
110-
targets.scope_stack.set_current_node(start_id);
111-
112-
while(targets.scope_stack.get_current_node() > end_id)
113-
{
114-
//node_indext current_node = targets.scope_stack.get_current_node();
115-
116-
// optionalt<goto_programt::targett> &declaration =
117-
// targets.scope_stack.get_declaration(current_node);
118-
// targets.scope_stack.descend_tree();
119-
// if(declaration)
120-
// {
121-
// // TODO - TYPE CHECK FOR VAR ARRAYS!
122-
//
123-
// declarations.instructions.push_front(
124-
// goto_programt::instructiont{
125-
// *declaration,
126-
// declaration->source_location(),
127-
// goto_program_instruction_typet::DECL, nil_exprt(), {}});
128-
// }
129-
}
130-
131-
// Restore the working destructor stack to how it was before we began:
132-
targets.scope_stack.set_current_node(start_id);
133-
134-
return declarations;
135-
}
136-
13796
struct build_declaration_hops_inputst
13897
{
13998
irep_idt mode;

src/goto-programs/goto_convert_class.h

-5
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,6 @@ class goto_convertt:public messaget
363363
optionalt<node_indext> destructor_end_point = {},
364364
optionalt<node_indext> destructor_start_point = {});
365365

366-
goto_programt build_declaration_stack(
367-
const irep_idt &mode,
368-
node_indext declaration_start_point,
369-
node_indext declaration_end_point);
370-
371366
void build_declaration_hops(
372367
goto_programt &dest,
373368
std::unordered_map<irep_idt, symbolt, irep_id_hash> &label_flags,

0 commit comments

Comments
 (0)