Skip to content

Commit d6a35bc

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
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 df10e7b commit d6a35bc

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

Diff for: src/ansi-c/expr2c.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,6 @@ std::string expr2ct::convert_rec(
573573

574574
return q+dest+d;
575575
}
576-
else if(src.id()==ID_gcc_builtin_va_list)
577-
{
578-
return q+"__builtin_va_list"+d;
579-
}
580576
else if(src.id()==ID_constructor ||
581577
src.id()==ID_destructor)
582578
{

Diff for: src/goto-instrument/goto_program2code.cpp

-24
Original file line numberDiff line numberDiff line change
@@ -121,24 +121,7 @@ void goto_program2codet::scan_for_varargs()
121121
}
122122

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

144127
goto_programt::const_targett goto_program2codet::convert_instruction(
@@ -322,7 +305,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
322305
code_function_callt f(
323306
symbol_exprt("va_end", code_typet({}, empty_typet())),
324307
{this_va_list_expr});
325-
f.arguments().back().type().id(ID_gcc_builtin_va_list);
326308

327309
dest.add(std::move(f));
328310
}
@@ -331,7 +313,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
331313
code_function_callt f(
332314
symbol_exprt("va_start", code_typet({}, empty_typet())),
333315
{this_va_list_expr, to_address_of_expr(r).object()});
334-
f.arguments().front().type().id(ID_gcc_builtin_va_list);
335316

336317
dest.add(std::move(f));
337318
}
@@ -341,7 +322,6 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
341322
code_function_callt f(
342323
symbol_exprt("va_arg", code_typet({}, empty_typet())),
343324
{this_va_list_expr});
344-
f.arguments().back().type().id(ID_gcc_builtin_va_list);
345325

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

399378
dest.add(std::move(f));
400379
}
@@ -1452,9 +1431,6 @@ void goto_program2codet::cleanup_code(
14521431
{
14531432
if(code.get_statement()==ID_decl)
14541433
{
1455-
if(va_list_expr.find(code.op0())!=va_list_expr.end())
1456-
code.op0().type().id(ID_gcc_builtin_va_list);
1457-
14581434
if(code.operands().size()==2 &&
14591435
code.op1().id()==ID_side_effect &&
14601436
to_side_effect_expr(code.op1()).get_statement()==ID_function_call)

Diff for: src/util/irep_ids.def

-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ IREP_ID_ONE(clang_builtin_convertvector)
304304
IREP_ID_ONE(gcc_builtin_va_arg)
305305
IREP_ID_ONE(gcc_builtin_types_compatible_p)
306306
IREP_ID_ONE(gcc_builtin_va_arg_next)
307-
IREP_ID_ONE(gcc_builtin_va_list)
308307
IREP_ID_ONE(gcc_float16)
309308
IREP_ID_ONE(gcc_float32)
310309
IREP_ID_ONE(gcc_float32x)

0 commit comments

Comments
 (0)