public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: David Faust <dfaust@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/dfaust/heads/btf-type-tag-new-rebase)] dwarf: Add dw_get_die_parent function Date: Fri, 7 Oct 2022 18:34:21 +0000 (GMT) [thread overview] Message-ID: <20221007183421.07E913858C55@sourceware.org> (raw) https://gcc.gnu.org/g:9152a143db240e76491a5bc1c432fe74b6396350 commit 9152a143db240e76491a5bc1c432fe74b6396350 Author: David Faust <david.faust@oracle.com> Date: Wed Mar 2 14:58:15 2022 -0800 dwarf: Add dw_get_die_parent function gcc/ * dwarf2out.cc (dw_get_die_parent): New function. * dwarf2out.h (dw_get_die_parent): Declare it here. Diff: --- gcc/dwarf2out.cc | 8 ++++++++ gcc/dwarf2out.h | 1 + 2 files changed, 9 insertions(+) diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index e81044b8c48..9429e04cb06 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -5235,6 +5235,14 @@ dw_get_die_sib (dw_die_ref die) return die->die_sib; } +/* Return a reference to the parent of a given DIE. */ + +dw_die_ref +dw_get_die_parent (dw_die_ref die) +{ + return die->die_parent; +} + /* Add an address constant attribute value to a DIE. When using dwarf_split_debug_info, address attributes in dies destined for the final executable should be direct references--setting the parameter diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h index 656ef94afde..e6962fb4848 100644 --- a/gcc/dwarf2out.h +++ b/gcc/dwarf2out.h @@ -455,6 +455,7 @@ 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); +extern dw_die_ref dw_get_die_parent (dw_die_ref); extern enum dwarf_tag dw_get_die_tag (dw_die_ref); /* Data about a single source file. */
reply other threads:[~2022-10-07 18:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221007183421.07E913858C55@sourceware.org \ --to=dfaust@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).