Go to file
Nathan Sidwell 73baba1ae1 c++: New module mangling ABI
This implements a new module mangling ABI as the original one has a
few issues:

a) it was not demangleable (oops)

b) implemented a weak ownership model.

This implements a strong ownership model, so that exported entities
from named modules are mangled to include their module attachment.
This gives more informative linker diagnostics and better module
isolation.  Weak ownership was hoped to allow backwards compatibility
with non-modular code, but in practice was very brittle, and C++20
added new semantics for linkage declarations that cover the needed
functionality.

FAOD Clang is also moving to this ABI and documentation will be added
to the Itanium ABI specification.

gcc/cp/
	* cp-tree.h (mangle_identifier): Replace with ...
	(mangle_module_component): ... this.
	* mangle.cc (dump_substitution_candidates): Adjust.
	(add_substitution): Likewise.
	(find_substitution): Likewise.
	(unmangled_name_p): Likewise.
	(mangle_module_substitution): Reimplement.
	(mangle_module_component): New.
	(write_module, maybe_write_module): Adjust.
	(write_name): Drop modules here.
	(write_unqualified): Do them here instead.
	(mangle_global_init): Adjust.
	* module.cc (module_state::mangle): Adjust.
	(mangle_module): Likewise.
	(get_originating_module): Adjust.

gcc/testsuite/
	* g++.dg/modules/fn-inline-1_b.C: Adjust.
	* g++.dg/modules/fn-inline-1_c.C: Adjust.
	* g++.dg/modules/imp-inline-1_a.C: Adjust.
	* g++.dg/modules/imp-inline-1_b.C: Adjust.
	* g++.dg/modules/init-2_a.C: Adjust.
	* g++.dg/modules/init-2_b.C: Adjust.
	* g++.dg/modules/init-2_c.C: Adjust.
	* g++.dg/modules/member-def-2_d.C: Adjust.
	* g++.dg/modules/mod-sym-1.C: Adjust.
	* g++.dg/modules/mod-sym-2.C: Adjust.
	* g++.dg/modules/mod-sym-3.C: Adjust.
	* g++.dg/modules/sym-subst-1.C: Adjust.
	* g++.dg/modules/sym-subst-2_b.C: Adjust.
	* g++.dg/modules/sym-subst-3_a.C: Adjust.
	* g++.dg/modules/sym-subst-3_b.C: Adjust.
	* g++.dg/modules/sym-subst-4.C: Adjust.
	* g++.dg/modules/sym-subst-5.C: Adjust.
	* g++.dg/modules/sym-subst-6.C: Adjust.
	* g++.dg/modules/tpl-spec-1_a.C: Adjust.
	* g++.dg/modules/tpl-spec-2_b.C: Adjust.
	* g++.dg/modules/tpl-spec-2_d.C: Adjust.
	* g++.dg/modules/tpl-spec-3_a.C: Adjust.
	* g++.dg/modules/virt-1_a.C: Adjust.
	* g++.dg/modules/virt-2_a.C: Adjust.
	* g++.dg/modules/virt-2_b.C: Adjust.
	* g++.dg/modules/virt-2_c.C: Adjust.
	* g++.dg/modules/vtt-1_a.C: Adjust.
	* g++.dg/modules/vtt-1_b.C: Adjust.
2022-03-04 10:15:18 -05:00
c++tools
config
contrib
fixincludes Daily bump. 2022-02-28 00:16:17 +00:00
gcc c++: New module mangling ABI 2022-03-04 10:15:18 -05:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp
libdecnumber
libffi
libgcc Daily bump. 2022-02-25 00:16:20 +00:00
libgfortran
libgo libgo: update README.gcc 2022-02-22 15:34:46 -08:00
libgomp Test 'libgomp.oacc-*/kernels-private-vars-*' with '--param=openacc-kernels=decompose' [PR104784] 2022-03-04 15:47:06 +01:00
libiberty Daily bump. 2022-02-23 00:16:24 +00:00
libitm
libobjc
liboffloadmic
libphobos Daily bump. 2022-03-03 00:16:24 +00:00
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: Fix -Wunused-local-typedefs warning in <compare> 2022-03-04 10:43:29 +00:00
libvtv
lto-plugin Daily bump. 2022-03-02 00:16:32 +00:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-02-23 00:16:24 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.