]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++/modules: Support re-streaming TU_LOCAL_ENTITYs [PR120412]
authorNathaniel Shead <nathanieloshead@gmail.com>
Sat, 24 May 2025 00:56:22 +0000 (10:56 +1000)
committerNathaniel Shead <nathanieloshead@gmail.com>
Thu, 24 Jul 2025 00:26:42 +0000 (10:26 +1000)
commitbe81c5c01c243013c4bac0718e63e0fdc132d384
tree71016325522d5e9310691f09de1f49a560a3e70d
parented331ef0c9346a2e3ead741c8a36c1ac8ecd6e89
c++/modules: Support re-streaming TU_LOCAL_ENTITYs [PR120412]

When emitting a primary module interface, we must re-stream any TU-local
entities that we saw in a partition.  This patch adds the missing
members from core_vals.

As a drive-by fix, in some cases we might have a typedef referring to a
TU-local entity; we need to handle that case as well.

PR c++/120412

gcc/cp/ChangeLog:

* module.cc (trees_out::core_vals): Write TU_LOCAL_ENTITY bits.
(trees_in::core_vals): Read it.
(trees_in::tree_node): Handle TU_LOCAL_ENTITY typedefs.

gcc/testsuite/ChangeLog:

* g++.dg/modules/internal-14_a.C: New test.
* g++.dg/modules/internal-14_b.C: New test.
* g++.dg/modules/internal-14_c.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/module.cc
gcc/testsuite/g++.dg/modules/internal-14_a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/internal-14_b.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/internal-14_c.C [new file with mode: 0644]