* symtab.h (struct symtab) <includes, user>: New fields.

* block.h (struct block_iterator) <d, idx, which>: New fields.
	* block.c (initialize_block_iterator, find_iterator_symtab)
	(block_iterator_step, block_iter_name_step)
	(block_iter_match_step): New functions.
	(block_iterator_first, block_iterator_next)
	(block_iter_name_first, block_iter_name_next)
	(block_iter_match_first, block_iter_match_next): Rewrite.
	(get_block_symtab): New function.
This commit is contained in:
Tom Tromey
2012-05-10 20:04:00 +00:00
parent 84a146c9d3
commit b5b04b5b7a
4 changed files with 284 additions and 7 deletions

View File

@@ -833,6 +833,23 @@ struct symtab
/* struct call_site entries for this compilation unit or NULL. */
htab_t call_site_htab;
/* If non-NULL, then this points to a NULL-terminated vector of
included symbol tables. When searching the static or global
block of this symbol table, the corresponding block of all
included symbol tables will also be searched. Note that this
list must be flattened -- the symbol reader is responsible for
ensuring that this vector contains the transitive closure of all
included symbol tables. */
struct symtab **includes;
/* If this is an included symbol table, this points to one includer
of the table. This user is considered the canonical symbol table
containing this one. An included symbol table may itself be
included by another. */
struct symtab *user;
};
#define BLOCKVECTOR(symtab) (symtab)->blockvector