diff options
author | Tom Tromey <tromey@adacore.com> | 2024-04-10 11:48:13 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-04-15 11:45:33 -0600 |
commit | 12406b2cdab40fd05df65c4fe4aabaf4882fcc8e (patch) | |
tree | 18d3e87d9450ee498d254daddc1cedc21a34cdb2 /gdb/cp-namespace.c | |
parent | 35d691515799a8cf7b82a1cb934dadb6a85b022f (diff) | |
download | gdb-12406b2cdab40fd05df65c4fe4aabaf4882fcc8e.zip gdb-12406b2cdab40fd05df65c4fe4aabaf4882fcc8e.tar.gz gdb-12406b2cdab40fd05df65c4fe4aabaf4882fcc8e.tar.bz2 |
Remove 'copy_names' parameter from add_using_directive
I noticed that add_using_directive's 'copy_names' parameter is only
used by a single caller. This patch removes the parameter and changes
that caller to copy the names itself. I chose to use intern here
since I suspect the names may well be repeated in a given objfile.
Approved-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r-- | gdb/cp-namespace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index ec72d72..4434ddf 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -100,8 +100,9 @@ cp_scan_for_anonymous_namespaces (struct buildsym_compunit *compunit, to 0, this way it is always considered valid. */ std::vector<const char *> excludes; add_using_directive (compunit->get_local_using_directives (), - dest, src, NULL, NULL, excludes, 0, - 1, &objfile->objfile_obstack); + objfile->intern (dest), objfile->intern (src), + nullptr, nullptr, excludes, 0, + &objfile->objfile_obstack); } /* The "+ 2" is for the "::". */ previous_component = next_component + 2; |