[all-commits] [llvm/llvm-project] f12860: [clang][MSVC] Correct mangling of thread-safe stat...
Tom Honermann via All-commits
all-commits at lists.llvm.org
Fri Mar 15 16:12:40 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f128607b89b4818a2265f5ebd09313408277d975
https://github.com/llvm/llvm-project/commit/f128607b89b4818a2265f5ebd09313408277d975
Author: Tom Honermann <tom.honermann at intel.com>
Date: 2024-03-15 (Fri, 15 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][MSVC] Correct mangling of thread-safe static initialization variables. (#85300)
Static local variables with dynamic initializers depend on implicitly defined
guard variables to synchronize thread-safe initialization. These guard
variables may have external linkage and therefore require a stable name for
linkage purposes. The Microsoft ABI assigns these variables a local name of
'$TSS' followed by a discriminator and mangles them as a static local variable
of type 'int'. Previously, the '$TSS<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 signature of the enclosing function. This change adds the
previously missing back reference registration. This matches the mangling
performed by MSVC and resolves incompatibilities when inline functions with
static local variables are inlined across DLL boundaries.
This is an ABI change and has the potential to cause backward compatibility
issues with previous Clang releases.
Fixes #83616
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