[clang] [clang][MSVC] Correct mangling of thread-safe static initialization variables. (PR #85300)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 13:11:01 PDT 2024
================
@@ -47,6 +47,12 @@ C++ Specific Potentially Breaking Changes
ABI Changes in This Version
---------------------------
+- Fixed Microsoft name mangling of implicitly defined variables used for thread
+ safe static initialization of static local variables. This change resolves
+ incompatibilities with code compiled by MSVC but might introduce
+ incompatibilities with code compiled by earlier versions of Clang when an
+ inline member function that contains a static local variable with a dynamic
+ initializer is declared with ``__declspec(dllimport)``. (#GH83616).
----------------
tahonermann wrote:
Per discussion in https://github.com/llvm/llvm-project/issues/83616, I did not tie the fix to the `-fclang-abi-compat=` option. I checked for uses of `LangOptions::ClangABI` and while I see many such uses in `ItaniumMangle.cpp`, there are currently none in `MicrosoftMangle.cpp`.
https://github.com/llvm/llvm-project/pull/85300
More information about the cfe-commits
mailing list