-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][MSVC] Correct mangling of thread-safe static initialization v…
…ariables. (#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
- Loading branch information
1 parent
8d7ee46
commit f128607
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters