MS ABI: Update alias template mangling for VC "14" CTP 3
MSVC "14" CTP 3 has fixed it's mangling for alias templates when used as
template-template arguments; update clang to be compatible with this
mangling.
llvm-svn: 215972
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 7a159f4..ddb4963 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -1195,9 +1195,8 @@
if (const auto *TD = dyn_cast<TagDecl>(ND)) {
mangleType(TD);
} else if (isa<TypeAliasDecl>(ND)) {
- // FIXME: The mangling, while compatible with VS "14", is horribly
- // broken. Update this when they release their next compiler.
- Out << '$';
+ Out << "$$Y";
+ mangleName(ND);
} else {
llvm_unreachable("unexpected template template NamedDecl!");
}
diff --git a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
index ff1692d..ded08b9 100644
--- a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
@@ -231,5 +231,5 @@
void f() {}
template void f<AliasA>();
-// CHECK-DAG: @"\01??$f@$@PR20047@@YAXXZ"
+// CHECK-DAG: @"\01??$f@$$YAliasA@PR20047@@@PR20047@@YAXXZ"
}