On Wed, Aug 4, 2021 at 7:55 PM David Faust via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Expose the function lookup_type_die in dwarf2out, so that it can be used
> by CTF/BTF when adding BPF CO-RE information. The function is now
> non-static, and an extern prototype is added in dwarf2out.h.

OK.

> gcc/ChangeLog:
>
>         * dwarf2out.c (lookup_type_die): Function is no longer static.
>         * dwarf2out.h: Expose it here.
> ---
>  gcc/dwarf2out.c | 3 +--
>  gcc/dwarf2out.h | 1 +
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
> index 1022fb75315..f32084c3eaf 100644
> --- a/gcc/dwarf2out.c
> +++ b/gcc/dwarf2out.c
> @@ -3740,7 +3740,6 @@ static bool remove_AT (dw_die_ref, enum 
> dwarf_attribute);
>  static void remove_child_TAG (dw_die_ref, enum dwarf_tag);
>  static void add_child_die (dw_die_ref, dw_die_ref);
>  static dw_die_ref new_die (enum dwarf_tag, dw_die_ref, tree);
> -static dw_die_ref lookup_type_die (tree);
>  static dw_die_ref strip_naming_typedef (tree, dw_die_ref);
>  static dw_die_ref lookup_type_die_strip_naming_typedef (tree);
>  static void equate_type_number_to_die (tree, dw_die_ref);
> @@ -5838,7 +5837,7 @@ new_die (enum dwarf_tag tag_value, dw_die_ref 
> parent_die, tree t)
>
>  /* Return the DIE associated with the given type specifier.  */
>
> -static inline dw_die_ref
> +dw_die_ref
>  lookup_type_die (tree type)
>  {
>    dw_die_ref die = TYPE_SYMTAB_DIE (type);
> diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
> index b2152a53bf9..312a9909784 100644
> --- a/gcc/dwarf2out.h
> +++ b/gcc/dwarf2out.h
> @@ -417,6 +417,7 @@ extern dw_die_ref new_die_raw (enum dwarf_tag);
>  extern dw_die_ref base_type_die (tree, bool);
>
>  extern dw_die_ref lookup_decl_die (tree);
> +extern dw_die_ref lookup_type_die (tree);
>
>  extern dw_die_ref dw_get_die_child (dw_die_ref);
>  extern dw_die_ref dw_get_die_sib (dw_die_ref);
> --
> 2.32.0
>

Reply via email to