summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-08-13 01:25:35 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-08-13 01:25:35 +0000
commite8fdc06e0dab2e7b98339425dbe369e27e2092a3 (patch)
tree09205b7e1181abe3ed146c29ed284db215362a53 /clang/lib/AST/MicrosoftMangle.cpp
parent3d96acb7351c3bb56d25889601a0f160fdfe9482 (diff)
downloadbcm5719-llvm-e8fdc06e0dab2e7b98339425dbe369e27e2092a3.tar.gz
bcm5719-llvm-e8fdc06e0dab2e7b98339425dbe369e27e2092a3.zip
[-cxx-abi microsoft] Mangle TemplateArgument::Declaration for references
Summary: Properly mangle declarations showing up in template arguments that are reference parameters. Fun-fact: undname cannot handle these! Reviewers: rnk, cdavis5x Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1356 llvm-svn: 188245
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 8d7b76db5e9..765b14d49e5 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -886,9 +886,11 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD,
mangleType(T, SourceRange(), QMM_Escape);
break;
}
- case TemplateArgument::Declaration:
- mangle(cast<NamedDecl>(TA.getAsDecl()), "$1?");
+ case TemplateArgument::Declaration: {
+ const NamedDecl *ND = cast<NamedDecl>(TA.getAsDecl());
+ mangle(ND, TA.isDeclForReferenceParam() ? "$E?" : "$1?");
break;
+ }
case TemplateArgument::Integral:
mangleIntegerLiteral(TA.getAsIntegral(),
TA.getIntegralType()->isBooleanType());
OpenPOWER on IntegriCloud