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>
(cherry picked from commit be81c5c01c243013c4bac0718e63e0fdc132d384)
4 files changed