llvm-project/clang/test/CodeGenCXX/cxx20-module-nested-2.cppm
Nathan Sidwell 21e16ab6b8 [clang][ABI] New C++20 module mangling scheme
The existing module symbol mangling scheme turns out to be
undemangleable.  It is also desirable to switch to the
strong-ownership model as the hoped-for C++17 compatibility turns out
to be fragile, and we also now have a better way of controlling that.

The issue is captured on the ABI list at:
  https://github.com/itanium-cxx-abi/cxx-abi/issues/134

A document describing the issues and new mangling is at:
  https://drive.google.com/file/d/1qQjqptzOFT_lfXH8L6-iD9nCRi34wjft/view

This patch is the code-generation part.  I have a demangler too, but
that patch is based on some to-be-landed refactoring of the demangler.

The old mangling is unceremoniously dropped.  No backwards
compatibility, no deprectated old-mangling flag.  It was always
labelled experimental.  (Old and new manglings cannot be confused.)

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D118352
2022-03-08 06:21:50 -08:00

13 lines
309 B
C++

// RUN: %clang_cc1 -fmodules-ts %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
export module FOO;
namespace Outer {
class Y;
class Inner {
class X;
void Fn (X &, Y &); // #2
};
// CHECK-DAG: define dso_local void @_ZN5OuterW3FOO5Inner2FnERNS1_1XERNS_S0_1YE(
void Inner::Fn (X &, Y &) {}
}