summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-04-09 12:47:38 +0000
committerReid Kleckner <reid@kleckner.net>2013-04-09 12:47:38 +0000
commit5fdaac15ec0396f4d41a63d94d2a54a4080f39c8 (patch)
treef6d2bfe58c91375f802833c42191067741e166ce /clang/lib/AST/MicrosoftMangle.cpp
parent090301e0094d5e954a8c861ebf0d8e3c6860b0a4 (diff)
downloadbcm5719-llvm-5fdaac15ec0396f4d41a63d94d2a54a4080f39c8.tar.gz
bcm5719-llvm-5fdaac15ec0396f4d41a63d94d2a54a4080f39c8.zip
[ms-cxxabi] Add "$$C" when mangling template arg QualTypes
Credit goes to Timur Iskhodzhanov for finding the problem and solution. llvm-svn: 179093
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp8
1 files changed, 6 insertions, 2 deletions
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<NamedDecl>(TA.getAsDecl()), "$1?");
break;
OpenPOWER on IntegriCloud