summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ItaniumMangle.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-30 21:59:02 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-30 21:59:02 +0000
commitdb49969b32269ccb7464ef03db916e134618980f (patch)
tree922fdd4725cc40bf906afa517fcfb105f348cda8 /clang/lib/AST/ItaniumMangle.cpp
parente7fe47e53b9f7c882048d29f06a7650ce921e2df (diff)
downloadbcm5719-llvm-db49969b32269ccb7464ef03db916e134618980f.tar.gz
bcm5719-llvm-db49969b32269ccb7464ef03db916e134618980f.zip
No, actually, we do need to be able to mangle substituted template names.
llvm-svn: 134195
Diffstat (limited to 'clang/lib/AST/ItaniumMangle.cpp')
-rw-r--r--clang/lib/AST/ItaniumMangle.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 0cbf1f7bdf2..9e647ad4107 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -1369,9 +1369,16 @@ void CXXNameMangler::mangleType(TemplateName TN) {
break;
}
- case TemplateName::SubstTemplateTemplateParm:
- llvm_unreachable("mangling a substituted template name!");
- break;
+ case TemplateName::SubstTemplateTemplateParm: {
+ // Substituted template parameters are mangled as the substituted
+ // template. This will check for the substitution twice, which is
+ // fine, but we have to return early so that we don't try to *add*
+ // the substitution twice.
+ SubstTemplateTemplateParmStorage *subst
+ = TN.getAsSubstTemplateTemplateParm();
+ mangleType(subst->getReplacement());
+ return;
+ }
case TemplateName::SubstTemplateTemplateParmPack: {
SubstTemplateTemplateParmPackStorage *SubstPack
OpenPOWER on IntegriCloud