Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABI updates for C++20 lambda-expression features: #85

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zygoloid
Copy link
Contributor

@zygoloid zygoloid commented Sep 5, 2019

  • include declarations for explicitly-specified template parameters in
    the lambda-sig mangling

  • add mangling for template parameters at different depths (possible
    via generic lambdas in unevaluated operands and via template template
    parameters in lambda-sigs)

Fixes #31, #157, #165.

 * include declarations for explicitly-specified template parameters in
   the lambda-sig mangling

 * add mangling for template parameters at different depths (possible
   via generic lambdas in unevaluated operands and via template template
   parameters in lambda-sigs)

Fixes itanium-cxx-abi#31.
@zygoloid zygoloid force-pushed the template-param-depth-and-lambda-sig branch from 84616bc to 3ebf3e6 Compare September 6, 2019 00:06
llvm-git-migration pushed a commit to llvm/llvm-project that referenced this pull request Sep 6, 2019
This implements demangling support for the mangling extensions specified
in itanium-cxx-abi/cxx-abi#85, much of which is
implemented in Clang r359967 and r371004.

Specifically, this provides demangling for:

 * <template-param-decl> in <lambda-sig>
 * <template-param> with non-zero level
 * lambda-expression literals (not emitted by Clang yet)
 * nullptr literals
 * string literals

(The final two seem unrelated, but handling them was necessary in order
to disambiguate between lambda expressions and the other forms of
literal for which we have a type but no value.)

When demangling a <lambda-sig>, we form template parameters with no
corresponding argument, so we cannot substitute in the argument in the
demangling. Instead we invent synthetic names for the template
parameters (eg, '[]<typename $T>($T *x)').

llvm-svn: 371273
dtzWill pushed a commit to llvm-mirror/libcxxabi that referenced this pull request Sep 6, 2019
This implements demangling support for the mangling extensions specified
in itanium-cxx-abi/cxx-abi#85, much of which is
implemented in Clang r359967 and r371004.

Specifically, this provides demangling for:

 * <template-param-decl> in <lambda-sig>
 * <template-param> with non-zero level
 * lambda-expression literals (not emitted by Clang yet)
 * nullptr literals
 * string literals

(The final two seem unrelated, but handling them was necessary in order
to disambiguate between lambda expressions and the other forms of
literal for which we have a type but no value.)

When demangling a <lambda-sig>, we form template parameters with no
corresponding argument, so we cannot substitute in the argument in the
demangling. Instead we invent synthetic names for the template
parameters (eg, '[]<typename $T>($T *x)').

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@371273 91177308-0d34-0410-b5e6-96231b3b80d8
unevaluated operands and therefore in function signatures).
@zygoloid zygoloid force-pushed the template-param-depth-and-lambda-sig branch 2 times, most recently from 9aba465 to 1a6ce4e Compare September 9, 2019 21:31
arguments and default member initializers.
@zygoloid zygoloid force-pushed the template-param-depth-and-lambda-sig branch from 1a6ce4e to 9618b59 Compare September 9, 2019 22:13
jrtc27 pushed a commit to CTSRD-CHERI/llvm-project that referenced this pull request Oct 5, 2019
This implements demangling support for the mangling extensions specified
in itanium-cxx-abi/cxx-abi#85, much of which is
implemented in Clang r359967 and r371004.

Specifically, this provides demangling for:

 * <template-param-decl> in <lambda-sig>
 * <template-param> with non-zero level
 * lambda-expression literals (not emitted by Clang yet)
 * nullptr literals
 * string literals

(The final two seem unrelated, but handling them was necessary in order
to disambiguate between lambda expressions and the other forms of
literal for which we have a type but no value.)

When demangling a <lambda-sig>, we form template parameters with no
corresponding argument, so we cannot substitute in the argument in the
demangling. Instead we invent synthetic names for the template
parameters (eg, '[]<typename $T>($T *x)').

llvm-svn: 371273
phanikishoreg pushed a commit to gwsystems/wasmception-libcxxabi that referenced this pull request Apr 1, 2020
This implements demangling support for the mangling extensions specified
in itanium-cxx-abi/cxx-abi#85, much of which is
implemented in Clang r359967 and r371004.

Specifically, this provides demangling for:

 * <template-param-decl> in <lambda-sig>
 * <template-param> with non-zero level
 * lambda-expression literals (not emitted by Clang yet)
 * nullptr literals
 * string literals

(The final two seem unrelated, but handling them was necessary in order
to disambiguate between lambda expressions and the other forms of
literal for which we have a type but no value.)

When demangling a <lambda-sig>, we form template parameters with no
corresponding argument, so we cannot substitute in the argument in the
demangling. Instead we invent synthetic names for the template
parameters (eg, '[]<typename $T>($T *x)').

git-svn-id: http://llvm.org/svn/llvm-project/libcxxabi/trunk@371273 91177308-0d34-0410-b5e6-96231b3b80d8
ianlancetaylor added a commit to ianlancetaylor/demangle that referenced this pull request Mar 31, 2021
conr2d pushed a commit to haderech/libcxxabi that referenced this pull request Aug 27, 2021
This implements demangling support for the mangling extensions specified
in itanium-cxx-abi/cxx-abi#85, much of which is
implemented in Clang r359967 and r371004.

Specifically, this provides demangling for:

 * <template-param-decl> in <lambda-sig>
 * <template-param> with non-zero level
 * lambda-expression literals (not emitted by Clang yet)
 * nullptr literals
 * string literals

(The final two seem unrelated, but handling them was necessary in order
to disambiguate between lambda expressions and the other forms of
literal for which we have a type but no value.)

When demangling a <lambda-sig>, we form template parameters with no
corresponding argument, so we cannot substitute in the argument in the
demangling. Instead we invent synthetic names for the template
parameters (eg, '[]<typename $T>($T *x)').

llvm-svn: 371273
rjmccall added a commit to rjmccall/cxx-abi that referenced this pull request May 15, 2023
This includes the material from itanium-cxx-abi#47 (non-type template
arguments), itanium-cxx-abi#63 (class constants), and the template-param-decl
portions of itanium-cxx-abi#85 (C++20 lambda-expressions).

@zygoloid gets credit for most of this, although I've made a few
substantive changes from his suggestions.
abi.html Outdated Show resolved Hide resolved
@zygoloid
Copy link
Contributor Author

I've removed the introduction of template-param-decl here, on the assumption that it will be provided by #166.

@rjmccall Please can you take a look? This has been pending for a while.

abi.html Outdated Show resolved Hide resolved
…ears in the signature of a function template.
rjmccall added a commit to rjmccall/cxx-abi that referenced this pull request Nov 2, 2023
This includes the material from itanium-cxx-abi#47 (non-type template
arguments), itanium-cxx-abi#63 (class constants), and the template-param-decl
portions of itanium-cxx-abi#85 (C++20 lambda-expressions).

@zygoloid gets credit for most of this, although I've made a few
substantive changes from his suggestions.
@dinord
Copy link

dinord commented Feb 15, 2024

Is it possible to merge this pull request? LLVM already implements the mangling grammar documented here.

copybara-service bot pushed a commit to abseil/abseil-cpp that referenced this pull request Feb 16, 2024
…ubstitutions

These were described in itanium-cxx-abi/cxx-abi#85 and implemented by LLVM.

PiperOrigin-RevId: 607555558
Change-Id: I9991ac88c1fcf63b25b93d93977a83ca343cdb5d
@dinord
Copy link

dinord commented Mar 29, 2024

Ping.

netkex pushed a commit to netkex/abseil-cpp that referenced this pull request Apr 3, 2024
…ubstitutions

These were described in itanium-cxx-abi/cxx-abi#85 and implemented by LLVM.

PiperOrigin-RevId: 607555558
Change-Id: I9991ac88c1fcf63b25b93d93977a83ca343cdb5d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mangling updates for lambdas with explicit template parameter lists
3 participants