From: Jason Merrill <jason@redhat.com>
To: Nathaniel Shead <nathanieloshead@gmail.com>, gcc-patches@gcc.gnu.org
Cc: Nathan Sidwell <nathan@acm.org>, Patrick Palka <ppalka@redhat.com>
Subject: Re: [PATCH] c++/modules: Prevent emission of really-extern vtables in importers [PR114229]
Date: Wed, 6 Mar 2024 08:59:16 -0500 [thread overview]
Message-ID: <79dad146-1efb-433c-97f8-83997cc4b51f@redhat.com> (raw)
In-Reply-To: <65e7ddc4.170a0220.d647a.c749@mx.google.com>
On 3/5/24 22:06, Nathaniel Shead wrote:
> Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?
>
> -- >8 --
>
> Currently, reading a variable definition always marks that decl as
> DECL_NOT_REALLY_EXTERN, with anything else imported still being
> considered external. This is not sufficient for vtables, however; for an
> extern template, a vtable may be generated (and its definition emitted)
> but nonetheless the vtable should only be emitted in the TU where that
> template is actually instantiated.
Does the vtable go through import_export_decl? I've been thinking that
that function (and import_export_class) need to be more module-aware.
Would it make sense to do that rather than stream DECL_NOT_REALLY_EXTERN?
Jason
next prev parent reply other threads:[~2024-03-06 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 3:06 Nathaniel Shead
2024-03-06 13:59 ` Jason Merrill [this message]
2024-03-07 12:49 ` [PATCH v2] c++: Redetermine whether to write vtables on stream-in [PR114229] Nathaniel Shead
2024-03-07 20:24 ` Jason Merrill
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=79dad146-1efb-433c-97f8-83997cc4b51f@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nathan@acm.org \
--cc=nathanieloshead@gmail.com \
--cc=ppalka@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).