Skip to content

Lambda function names generated by Clang does not conform to ABI #49553

@lxfind

Description

@lxfind
Bugzilla Link 50209
Version trunk
OS Linux
CC @dwblaikie,@DougGregor,@Dushistov,@efriedma-quic,@urnathan,@zygoloid,@tstellar

Extended Description

When compiling lambda functions, the generated function
names use different conventions than GCC.
Example: https://godbolt.org/z/5qvqKqEe6
The lambda in Clang is named _Z3barIZ3foovE3$_0EvT_, while the one
in GCC is named _Z3barIZ3foovEUlvE_EvT_. Their demangled names are
also different (void bar<foo()::$_0>(foo()::$_0) vs void bar<foo()::{lambda()#1}>(foo()::{lambda()#1})).

Discussions in clang-dev: https://lists.llvm.org/pipermail/cfe-dev/2021-May/068080.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:codegenIR generation bugs: mangling, exceptions, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions