[llvm-bugs] [Bug 50209] New: Lambda function names generated by Clang does not conform to ABI

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 3 11:10:31 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50209

            Bug ID: 50209
           Summary: Lambda function names generated by Clang does not
                    conform to ABI
           Product: clang
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lxfind at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210503/1bfff84a/attachment.html>


More information about the llvm-bugs mailing list