Skip to content

Commit 7639110

Browse files
committed
Remove ID_gcc_builtin_va_list
We carry typedef names all the way now, there is no need for additional annotations to preserve the typedef name of va_list for dump-c.
1 parent 722b07e commit 7639110

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

src/ansi-c/expr2c.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,6 @@ std::string expr2ct::convert_rec(
609609

610610
return q+dest+d;
611611
}
612-
else if(src.id()==ID_gcc_builtin_va_list)
613-
{
614-
return q+"__builtin_va_list"+d;
615-
}
616612
else if(src.id()==ID_constructor ||
617613
src.id()==ID_destructor)
618614
{

src/goto-instrument/goto_program2code.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,7 @@ void goto_program2codet::scan_for_varargs()
122122
}
123123

124124
if(!va_list_expr.empty())
125-
{
126125
system_headers.insert("stdarg.h");
127-
128-
code_typet &code_type=
129-
to_code_type(symbol_table.get_writeable_ref(func_name).type);
130-
code_typet::parameterst &parameters=code_type.parameters();
131-
132-
for(code_typet::parameterst::iterator
133-
it2=parameters.begin();
134-
it2!=parameters.end();
135-
++it2)
136-
{
137-
const symbol_exprt arg=
138-
ns.lookup(it2->get_identifier()).symbol_expr();
139-
if(va_list_expr.find(arg)!=va_list_expr.end())
140-
it2->type().id(ID_gcc_builtin_va_list);
141-
}
142-
}
143126
}
144127

145128
goto_programt::const_targett goto_program2codet::convert_instruction(
@@ -323,7 +306,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
323306
code_function_callt f(
324307
symbol_exprt("va_end", code_typet({}, empty_typet())),
325308
{this_va_list_expr});
326-
f.arguments().back().type().id(ID_gcc_builtin_va_list);
327309

328310
dest.add(std::move(f));
329311
}
@@ -332,7 +314,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
332314
code_function_callt f(
333315
symbol_exprt("va_start", code_typet({}, empty_typet())),
334316
{this_va_list_expr, to_address_of_expr(r).object()});
335-
f.arguments().front().type().id(ID_gcc_builtin_va_list);
336317

337318
dest.add(std::move(f));
338319
}
@@ -342,7 +323,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
342323
code_function_callt f(
343324
symbol_exprt("va_arg", code_typet({}, empty_typet())),
344325
{this_va_list_expr});
345-
f.arguments().back().type().id(ID_gcc_builtin_va_list);
346326

347327
// we do not bother to set the correct types here, they are not relevant for
348328
// generating the correct dumped output
@@ -395,7 +375,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
395375
code_function_callt f(
396376
symbol_exprt("va_copy", code_typet({}, empty_typet())),
397377
{this_va_list_expr, r});
398-
f.arguments().front().type().id(ID_gcc_builtin_va_list);
399378

400379
dest.add(std::move(f));
401380
}
@@ -1461,9 +1440,6 @@ void goto_program2codet::cleanup_code(
14611440
{
14621441
if(code.get_statement()==ID_decl)
14631442
{
1464-
if(va_list_expr.find(code.op0())!=va_list_expr.end())
1465-
code.op0().type().id(ID_gcc_builtin_va_list);
1466-
14671443
if(code.operands().size()==2 &&
14681444
code.op1().id()==ID_side_effect &&
14691445
to_side_effect_expr(code.op1()).get_statement()==ID_function_call)

src/util/irep_ids.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ IREP_ID_ONE(clang_builtin_convertvector)
305305
IREP_ID_ONE(gcc_builtin_va_arg)
306306
IREP_ID_ONE(gcc_builtin_types_compatible_p)
307307
IREP_ID_ONE(gcc_builtin_va_arg_next)
308-
IREP_ID_ONE(gcc_builtin_va_list)
309308
IREP_ID_ONE(gcc_float16)
310309
IREP_ID_ONE(gcc_float32)
311310
IREP_ID_ONE(gcc_float32x)

0 commit comments

Comments
 (0)