Use std::vector in add_using_directive

This changes add_using_directive to accept a std::vector and then
changes the callers.  This allows removing a cleanup.

ChangeLog
2017-09-09  Tom Tromey  <tom@tromey.com>

	* namespace.h (add_using_directive): Update.
	* namespace.c (add_using_directive): Change type of excludes to
	std::vector.
	* dwarf2read.c (read_import_statement): Use std::vector.
	(read_namespace): Update.
	* cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
This commit is contained in:
Tom Tromey
2017-09-06 17:18:23 -06:00
parent 0fc21fd8cf
commit eb1e02fd05
5 changed files with 24 additions and 21 deletions

View File

@@ -93,8 +93,9 @@ cp_scan_for_anonymous_namespaces (const struct symbol *const symbol,
anonymous namespace. So add symbols in it to the
namespace given by the previous component if there is
one, or to the global namespace if there isn't. */
std::vector<const char *> excludes;
add_using_directive (&local_using_directives,
dest, src, NULL, NULL, NULL, 1,
dest, src, NULL, NULL, excludes, 1,
&objfile->objfile_obstack);
}
/* The "+ 2" is for the "::". */