forked from OSchip/llvm-project
Assert when we try to mangle a dependent template name, rather than
crashing unceremoniously. llvm-svn: 95464
This commit is contained in:
parent
52cc0897f3
commit
cae03b1e6d
|
@ -1104,7 +1104,7 @@ void CXXNameMangler::mangleType(const TypenameType *T) {
|
|||
dyn_cast<TemplateSpecializationType>(QTy)) {
|
||||
if (!mangleSubstitution(QualType(TST, 0))) {
|
||||
TemplateDecl *TD = TST->getTemplateName().getAsTemplateDecl();
|
||||
|
||||
assert(TD && "FIXME: Support dependent template names");
|
||||
mangleTemplatePrefix(TD);
|
||||
mangleTemplateArgs(TST->getArgs(), TST->getNumArgs());
|
||||
addSubstitution(QualType(TST, 0));
|
||||
|
@ -1467,6 +1467,8 @@ void CXXNameMangler::mangleTemplateArg(const TemplateArgument &A) {
|
|||
mangleType(A.getAsType());
|
||||
break;
|
||||
case TemplateArgument::Template:
|
||||
assert(A.getAsTemplate().getAsTemplateDecl() &&
|
||||
"FIXME: Support dependent template names");
|
||||
mangleName(A.getAsTemplate().getAsTemplateDecl());
|
||||
break;
|
||||
case TemplateArgument::Expression:
|
||||
|
|
Loading…
Reference in New Issue