Introduce language_defn::lookup_symbol_local

This introduces the new method language_defn::lookup_symbol_local, and
then changes lookup_symbol_local to use it.  This removes an explicit
language check from this function, and makes it easier for other
languages to hook into this code.
This commit is contained in:
Tom Tromey
2024-05-23 10:30:16 -06:00
parent b2cb4b4005
commit 9c23c0df0d
5 changed files with 56 additions and 13 deletions

View File

@@ -1014,6 +1014,17 @@ public:
/* See language.h. */
struct block_symbol lookup_symbol_local
(const char *scope,
const char *name,
const struct block *block,
const domain_search_flags domain) const override
{
return cp_lookup_symbol_imports (scope, name, block, domain);
}
/* See language.h. */
struct block_symbol lookup_symbol_nonlocal
(const char *name, const struct block *block,
const domain_search_flags domain) const override