r215972 - MS ABI: Update alias template mangling for VC "14" CTP 3

David Majnemer david.majnemer at gmail.com
Tue Aug 19 00:29:03 PDT 2014


Author: majnemer
Date: Tue Aug 19 02:29:03 2014
New Revision: 215972

URL: http://llvm.org/viewvc/llvm-project?rev=215972&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/AST/MicrosoftMangle.cpp
    cfe/trunk/test/CodeGenCXX/mangle-ms-cxx11.cpp

Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=215972&r1=215971&r2=215972&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Tue Aug 19 02:29:03 2014
@@ -1195,9 +1195,8 @@ void MicrosoftCXXNameMangler::mangleTemp
     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!");
     }

Modified: cfe/trunk/test/CodeGenCXX/mangle-ms-cxx11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-ms-cxx11.cpp?rev=215972&r1=215971&r2=215972&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms-cxx11.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-ms-cxx11.cpp Tue Aug 19 02:29:03 2014
@@ -231,5 +231,5 @@ template <template <typename> class>
 void f() {}
 
 template void f<AliasA>();
-// CHECK-DAG: @"\01??$f@$@PR20047@@YAXXZ"
+// CHECK-DAG: @"\01??$f@$$YAliasA at PR20047@@@PR20047@@YAXXZ"
 }





More information about the cfe-commits mailing list