diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-09-17 23:57:10 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-09-17 23:57:10 +0000 |
commit | 50ce835ecb27cfc121ba895110866eccfd962f0b (patch) | |
tree | 5cd287b06e7615434f95981141c33b359601c3f6 /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 1b0256c37975a1769d879906139d20c2d51b4981 (diff) | |
download | bcm5719-llvm-50ce835ecb27cfc121ba895110866eccfd962f0b.tar.gz bcm5719-llvm-50ce835ecb27cfc121ba895110866eccfd962f0b.zip |
Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""
This reverts commit r190895 which reverted r190892.
llvm-svn: 190904
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 8506c4c8dde..119bc86be29 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -563,9 +563,15 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, break; } - // When VC encounters an anonymous type with no tag and no typedef, - // it literally emits '<unnamed-tag>@'. - Out << "<unnamed-tag>@"; + if (TD->hasDeclaratorForAnonDecl()) + // Anonymous types with no tag or typedef get the name of their + // declarator mangled in. + Out << "<unnamed-type-" << TD->getDeclaratorForAnonDecl()->getName() + << ">@"; + else + // Anonymous types with no tag, no typedef, or declarator get + // '<unnamed-tag>@'. + Out << "<unnamed-tag>@"; break; } |