/* Helper routines for C++ support in GDB.
- Copyright (C) 2003-2018 Free Software Foundation, Inc.
+ Copyright (C) 2003-2019 Free Software Foundation, Inc.
Contributed by David Carlton and by Kealia, Inc.
anonymous namespace; if so, add an appropriate using directive. */
void
-cp_scan_for_anonymous_namespaces (const struct symbol *const symbol,
+cp_scan_for_anonymous_namespaces (struct buildsym_compunit *compunit,
+ const struct symbol *const symbol,
struct objfile *const objfile)
{
if (SYMBOL_DEMANGLED_NAME (symbol) != NULL)
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, excludes, 1,
- &objfile->objfile_obstack);
+ add_using_directive (compunit->get_local_using_directives (),
+ dest, src, NULL, NULL, excludes,
+ 1, &objfile->objfile_obstack);
}
/* The "+ 2" is for the "::". */
previous_component = next_component + 2;
if (global_block != NULL)
{
- sym.symbol = lookup_symbol_in_block (name, global_block, domain);
+ sym.symbol = lookup_symbol_in_block (name,
+ symbol_name_match_type::FULL,
+ global_block, domain);
sym.block = global_block;
}
}
const struct block *block,
const domain_enum domain)
{
- /* type_name_no_tag_or_error provides better error reporting using the
+ /* type_name_or_error provides better error reporting using the
original type. */
struct type *saved_parent_type = parent_type;
if (symbol_lookup_debug)
{
- const char *type_name = type_name_no_tag (saved_parent_type);
+ const char *type_name = TYPE_NAME (saved_parent_type);
fprintf_unfiltered (gdb_stdlog,
"cp_lookup_nested_symbol (%s, %s, %s, %s)\n",
case TYPE_CODE_MODULE:
{
int size;
- const char *parent_name = type_name_no_tag_or_error (saved_parent_type);
+ const char *parent_name = type_name_or_error (saved_parent_type);
struct block_symbol sym;
char *concatenated_name;
int is_in_anonymous;