diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-12-13 00:52:45 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-12-13 00:52:45 +0000 |
commit | 25e1a5e7e325e68c46b63594ca85d467b4b00126 (patch) | |
tree | 8d729a7ba6d2267efc53687379a02508e3a53a43 /clang | |
parent | 210e6bfa19ab68b75992ba5d6ebfb9d377237de3 (diff) | |
download | bcm5719-llvm-25e1a5e7e325e68c46b63594ca85d467b4b00126.tar.gz bcm5719-llvm-25e1a5e7e325e68c46b63594ca85d467b4b00126.zip |
[-cxx-abi microsoft] Add commentary for mangleStaticGuardVariable
We will need to do some work here if we want to play nice with MSVC2013.
Add a TODO indicating what changed and why this matters.
llvm-svn: 197193
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 24eac84cdd2..8a2357d057b 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -2048,6 +2048,15 @@ void MicrosoftMangleContextImpl::mangleReferenceTemporary(const VarDecl *VD, void MicrosoftMangleContextImpl::mangleStaticGuardVariable(const VarDecl *VD, raw_ostream &Out) { + // TODO: This is not correct, especially with respect to MSVC2013. MSVC2013 + // utilizes thread local variables to implement thread safe, re-entrant + // initialization for statics. They no longer differentiate between an + // externally visible and non-externally visible static with respect to + // mangling, they all get $TSS <number>. + // + // N.B. This means that they can get more than 32 static variable guards in a + // scope. It also means that they broke compatibility with their own ABI. + // <guard-name> ::= ?_B <postfix> @51 // ::= ?$S <guard-num> @ <postfix> @4IA |