From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Add first_dup macro
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20190409161947.GA28904@delia> (raw)
Hi,
Committed to trunk.
Thanks,
- Tom
Add first_dup macro
2019-04-09 Tom de Vries <tdevries@suse.de>
* dwz.c (first_dup): New macro.
---
dwz.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dwz.c b/dwz.c
index eb97feb..8ea7c4d 100644
--- a/dwz.c
+++ b/dwz.c
@@ -794,6 +794,15 @@ die_cu (dw_die_ref die)
return (dw_cu_ref) die->die_parent;
}
+/* Given a toplevel die DIE, return the first (that is, the reference die) in
+ the duplicate chain. */
+#define first_dup(die) \
+ (die->die_dup \
+ ? die->die_dup \
+ : (die->die_nextdup \
+ ? die \
+ : NULL))
+
/* Safe variant that check die_toplevel. Can't be used on LHS. */
#define die_safe_dup(die) \
((die)->die_toplevel ? (die)->die_dup : (dw_die_ref) NULL)
reply other threads:[~2019-04-09 16:19 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=20190409161947.GA28904@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
/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: link
Be 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).