From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applying to mainline] dwarf-reader: Fix detection of C language DIEs
Date: Mon, 12 Feb 2024 22:26:11 +0100 [thread overview]
Message-ID: <874jedz85o.fsf@redhat.com> (raw)
Hello,
If a DIE comes from C, then for that type, namespace support is
disabled. In this case, we mistakenly look at the language of the
current translation unit DIE rather than the language of the DIE
itself. So we mistakenly find that the DIE comes from C when it
actually can come from C++. And we thus mistakenly disable
namespaces.
Fixed thus.
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Use
reader::die_is_in_c rather than looking at the language of the
current translation unit.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applying to the master branch.
---
src/abg-dwarf-reader.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 8c624d48..dc491b93 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -16181,7 +16181,7 @@ build_ir_node_from_die(reader& rdr,
if (!die)
return decl_base_sptr();
- if (is_c_language(rdr.cur_transl_unit()->get_language()))
+ if (rdr.die_is_in_c(die))
{
const scope_decl_sptr& scop = rdr.global_scope();
return build_ir_node_from_die(rdr, die, scop.get(),
--
2.39.3
--
Dodji
reply other threads:[~2024-02-12 21:26 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=874jedz85o.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@sourceware.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: 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).