+2014-12-23 Doug Evans <xdje42@gmail.com>
+
+ * language.h (struct language_defn) <la_lookup_symbol_nonlocal>:
+ New arg language_defn. All uses updated.
+
2014-12-23 Doug Evans <xdje42@gmail.com>
* symtab.h (SYMBOL_SYMTAB): Delete
}
static struct symbol *
-ada_lookup_symbol_nonlocal (const char *name,
+ada_lookup_symbol_nonlocal (const struct language_defn *langdef,
+ const char *name,
const struct block *block,
const domain_enum domain)
{
DOMAIN says what kind of symbols we're looking for. */
struct symbol *
-cp_lookup_symbol_nonlocal (const char *name,
+cp_lookup_symbol_nonlocal (const struct language_defn *langdef,
+ const char *name,
const struct block *block,
const domain_enum domain)
{
extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol,
struct objfile *objfile);
-extern struct symbol *cp_lookup_symbol_nonlocal (const char *name,
- const struct block *block,
- const domain_enum domain);
+extern struct symbol *cp_lookup_symbol_nonlocal
+ (const struct language_defn *langdef,
+ const char *name,
+ const struct block *block,
+ const domain_enum domain);
extern struct symbol *cp_lookup_symbol_namespace (const char *namespace,
const char *name,
the part of symbol lookup where C looks up static and global
variables. */
- struct symbol *(*la_lookup_symbol_nonlocal) (const char *,
+ struct symbol *(*la_lookup_symbol_nonlocal) (const struct language_defn *,
+ const char *,
const struct block *,
const domain_enum);
/* Now do whatever is appropriate for LANGUAGE to look
up static and global variables. */
- sym = langdef->la_lookup_symbol_nonlocal (name, block, domain);
+ sym = langdef->la_lookup_symbol_nonlocal (langdef, name, block, domain);
if (sym != NULL)
{
if (symbol_lookup_debug)
/* See symtab.h. */
struct symbol *
-basic_lookup_symbol_nonlocal (const char *name,
+basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
+ const char *name,
const struct block *block,
const domain_enum domain)
{
that can't think of anything better to do.
This implements the C lookup rules. */
-extern struct symbol *basic_lookup_symbol_nonlocal (const char *,
- const struct block *,
- const domain_enum);
+extern struct symbol *
+ basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
+ const char *,
+ const struct block *,
+ const domain_enum);
/* Some helper functions for languages that need to write their own
lookup_symbol_nonlocal functions. */