Convert block_linkage_function to method

This converts block_linkage_function to be a method.  This was mostly
written by script.
This commit is contained in:
Tom Tromey
2023-01-16 17:44:20 -07:00
parent 3c45e9f915
commit 3c9d050626
10 changed files with 22 additions and 19 deletions

View File

@@ -86,15 +86,13 @@ contained_in (const struct block *a, const struct block *b,
return false;
}
/* Return the symbol for the function which contains a specified
lexical block, described by a struct block BL. The return value
will not be an inlined function; the containing function will be
returned instead. */
/* See block.h. */
struct symbol *
block_linkage_function (const struct block *bl)
block::linkage_function () const
{
const block *bl = this;
while ((bl->function () == NULL || bl->inlined_p ())
&& bl->superblock () != NULL)
bl = bl->superblock ();