[all-commits] [llvm/llvm-project] ae4dce: [clang][ABI] New C++20 module mangling scheme

Nathan Sidwell via All-commits all-commits at lists.llvm.org
Wed Mar 30 08:51:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae4dce8659f313ca2034782583d31993212fa8bd
      https://github.com/llvm/llvm-project/commit/ae4dce8659f313ca2034782583d31993212fa8bd
  Author: Nathan Sidwell <nathan at acm.org>
  Date:   2022-03-30 (Wed, 30 Mar 2022)

  Changed paths:
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp
    M clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cppm
    M clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp
    M clang/test/CXX/modules-ts/basic/basic.link/p3.cppm
    M clang/test/CXX/modules-ts/codegen-basics.cppm
    A clang/test/CodeGenCXX/Inputs/cxx20-module-impl-1a.cpp
    A clang/test/CodeGenCXX/Inputs/cxx20-module-std-subst-2a.cpp
    A clang/test/CodeGenCXX/cxx20-module-decomp-1.cpp
    A clang/test/CodeGenCXX/cxx20-module-extern-1.cppm
    A clang/test/CodeGenCXX/cxx20-module-impl-1a.cpp
    A clang/test/CodeGenCXX/cxx20-module-nested-1.cppm
    A clang/test/CodeGenCXX/cxx20-module-nested-2.cppm
    A clang/test/CodeGenCXX/cxx20-module-part-1a.cpp
    A clang/test/CodeGenCXX/cxx20-module-part-1b.cpp
    A clang/test/CodeGenCXX/cxx20-module-part-1c.cpp
    A clang/test/CodeGenCXX/cxx20-module-std-subst-1.cppm
    A clang/test/CodeGenCXX/cxx20-module-std-subst-2b.cpp
    A clang/test/CodeGenCXX/cxx20-module-std-subst-2c.cpp
    A clang/test/CodeGenCXX/cxx20-module-sub-1a.cppm
    A clang/test/CodeGenCXX/cxx20-module-sub-1b.cppm
    A clang/test/CodeGenCXX/cxx20-module-tmpl-1.cppm

  Log Message:
  -----------
  [clang][ABI] New C++20 module mangling scheme

Implement a demangleable strong ownership symbol mangling.

 * The original module symbol mangling scheme turned out to be
undemangleable.

 * The hoped-for C++17 compatibility of weak ownership turns out to be
fragile

* C++20 now has better ways of controlling C++17 compatibility

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

GCC implements this new mangling.

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: dblaikie

Differential Revision: https://reviews.llvm.org/D122256




More information about the All-commits mailing list