GCOV: std::vector refactoring.
authorMartin Liska <mliska@suse.cz>
Tue, 31 Oct 2017 11:58:53 +0000 (12:58 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 31 Oct 2017 11:58:53 +0000 (11:58 +0000)
commitc7432e76039d2c4fb7a00f0fbd261eec2238d42b
treeacaed900ec6dda1fa1e1f45383ce9f9414b64fd8
parentcdb07de7c67cf0d04607ee8e85a659d8bf7594f6
GCOV: std::vector refactoring.

2017-10-31  Martin Liska  <mliska@suse.cz>

* gcov.c (struct source_info): Remove typedef.
(source_info::source_info): Add proper ctor.
(accumulate_line_counts): Use struct, not it's typedef.
(output_gcov_file): Likewise.
(output_lines): Likewise.
(main): Do not allocate an array.
(output_intermediate_file): Use size of vector container.
(process_file): Resize the vector.
(generate_results): Do not preallocate, use newly added vector
lines.
(release_structures): Do not release sources.
(find_source): Use vector methods.
(add_line_counts): Do not use typedef.

From-SVN: r254260
gcc/ChangeLog
gcc/gcov.c