public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/dfaust/heads/btf-type-tag-new-rebase)] dwarf: Add dw_get_die_parent function
@ 2022-10-07 18:34 David Faust
0 siblings, 0 replies; only message in thread
From: David Faust @ 2022-10-07 18:34 UTC (permalink / raw)
To: gcc-cvs
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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-07 18:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 18:34 [gcc(refs/users/dfaust/heads/btf-type-tag-new-rebase)] dwarf: Add dw_get_die_parent function David Faust
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).