GCOV: std::vector refactoring.
commit9e8df75755326c5eee43941901bbeea7df457257
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Oct 2017 11:58:53 +0000 (31 11:58 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Oct 2017 11:58:53 +0000 (31 11:58 +0000)
treeacaed900ec6dda1fa1e1f45383ce9f9414b64fd8
parent3cf7fddf54b5160e83236f1b9b3129e2a3a417c6
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254260 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gcov.c