Use std::vector in type stacks
authorTom Tromey <tom@tromey.com>
Thu, 3 Jan 2019 02:12:32 +0000 (19:12 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 6 Jan 2019 16:39:33 +0000 (09:39 -0700)
commit02e12e3806bc60f66e3c446c4dfa9c06a400e604
tree480e7eca926f9945bcd9d7c199b7df57271ddde1
parentf097f5ad808bd535236a65077f40e9d082a4ec0b
Use std::vector in type stacks

This removes the use of VEC from parse.c and, at the same time,
removes some related cleanups from c-exp.y.

gdb/ChangeLog
2019-01-06  Tom Tromey  <tom@tromey.com>

* parser-defs.h (type_ptr): Remove typedef.  Don't declare VEC.
(union type_stack_elt) <typelist_val>: Now a pointer to
std::vector.
(type_stack_cleanup): Don't declare.
(push_typelist): Update.
* parse.c (pop_typelist): Return a std::vector.
(push_typelist): Take a std::vector.
(follow_types): Update.  Do not free args.
(type_stack_cleanup): Remove.
* c-exp.y (struct c_parse_state): New.
(cpstate): New global.
(type_aggregate_p, exp, ptr_operator, parameter_typelist)
(nonempty_typelist): Update.
(func_mod): Create a new vector.
(c_parse): Create a c_parse_state.
(check_parameter_typelist): Do not delete params.
(function_method): Update.  Do not delete type_list.
gdb/ChangeLog
gdb/c-exp.y
gdb/parse.c
gdb/parser-defs.h
This page took 0.027047 seconds and 4 git commands to generate.