From 5fdaac15ec0396f4d41a63d94d2a54a4080f39c8 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 9 Apr 2013 12:47:38 +0000 Subject: [ms-cxxabi] Add "$$C" when mangling template arg QualTypes Credit goes to Timur Iskhodzhanov for finding the problem and solution. llvm-svn: 179093 --- clang/lib/AST/MicrosoftMangle.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'clang/lib/AST/MicrosoftMangle.cpp') diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 40f8730e61a..9cd6bac971f 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -824,9 +824,13 @@ MicrosoftCXXNameMangler::mangleTemplateArgs(const TemplateDecl *TD, switch (TA.getKind()) { case TemplateArgument::Null: llvm_unreachable("Can't mangle null template arguments!"); - case TemplateArgument::Type: - mangleType(TA.getAsType(), SourceRange()); + case TemplateArgument::Type: { + QualType T = TA.getAsType(); + if (T.hasQualifiers()) + Out << "$$C"; + mangleType(T, SourceRange()); break; + } case TemplateArgument::Declaration: mangle(cast(TA.getAsDecl()), "$1?"); break; -- cgit v1.2.3