[all-commits] [llvm/llvm-project] bea17f: [clang] Correct Microsoft mangling of lifetime ext...
Tom Honermann via All-commits
all-commits at lists.llvm.org
Mon Mar 25 07:39:27 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bea17ff652bc49b2de8d6be04f77d28170a78be9
https://github.com/llvm/llvm-project/commit/bea17ff652bc49b2de8d6be04f77d28170a78be9
Author: Tom Honermann <tom.honermann at intel.com>
Date: 2024-03-25 (Mon, 25 Mar 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/AST/MicrosoftMangle.cpp
M clang/test/CodeGenCXX/mangle-ms-back-references.cpp
Log Message:
-----------
[clang] Correct Microsoft mangling of lifetime extended temporary objects. (#85529)
Lifetime extended temporary objects that are bound to references with
static storage duration may have external linkage and therefore require
mangled symbol names. Clang uses an extension of the Microsoft ABI to
give these symbols an implicit name of '$RT' followed by a discriminator
and then mangles them similarly to the variable they are bound to.
Clang's mangling scheme differs from the one used by MSVC.
Previously, the `$RT<discriminator>` portion of the name was not
registered as a back reference candidate and this resulted in incorrect
back references for enclosing class and/or namespace scopes that might
be referenced in the type of the object.
This is an ABI change and has the potential to cause backward
compatibility issues with previous Clang releases. Since MSVC uses a
different mangling scheme, this change does not affect compatibility
with MSVC.
This fixes one of the name mangling concerns reported in #85423.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list