c++: import/export NTTP objects
authorNathan Sidwell <nathan@acm.org>
Wed, 28 Sep 2022 16:21:14 +0000 (09:21 -0700)
committerNathan Sidwell <nathan@acm.org>
Thu, 29 Sep 2022 11:41:59 +0000 (04:41 -0700)
commita1f7f9541c2b20eb44750b9c15cd831c62d67f21
tree529824b945287a36edabb58329af0cdbc9444ad3
parenta0aafbc324aa90421f0ce99c6f5bbf64ed163da6
c++: import/export NTTP objects

This adds smarts to the module machinery to handle NTTP object
VAR_DECLs.  Like typeinfo objects, these must be ignored in the symbol
table, streamed specially and recreated on stream in.

gcc/cp/
PR c++/100616
* module.cc (enum tree_tag): Add tt_nttp_var.
(trees_out::decl_node): Handle NTTP objects.
(trees_in::tree_node): Handle tt_nttp_var.
(depset::hash::add_binding_entry): Skip NTTP objects.

gcc/testsuite/
PR c++/100616
* g++.dg/modules/100616_a.H: New.
* g++.dg/modules/100616_b.C: New.
* g++.dg/modules/100616_c.C: New.
* g++.dg/modules/100616_d.C: New.
gcc/cp/module.cc
gcc/testsuite/g++.dg/modules/100616_a.H [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/100616_b.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/100616_c.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/100616_d.C [new file with mode: 0644]