Use mangleTemplatePrefix when we know that we're mangling a nested template name.

llvm-svn: 82912
This commit is contained in:
Anders Carlsson 2009-09-27 19:53:49 +00:00
parent 10a1cfd0f9
commit d122de5f32
2 changed files with 12 additions and 2 deletions

View File

@ -480,11 +480,13 @@ void CXXNameMangler::mangleNestedName(const NamedDecl *ND) {
void CXXNameMangler::mangleNestedName(const TemplateDecl *TD,
const TemplateArgument *TemplateArgs,
unsigned NumTemplateArgs) {
// <nested-name> ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
Out << 'N';
manglePrefix(TD->getDeclContext());
mangleUnqualifiedName(TD);
mangleTemplatePrefix(TD);
mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
Out << 'E';
}

View File

@ -46,3 +46,11 @@ template <typename T> void f2(V<T>, typename V<T>::U) { }
// CHECK: @_Z2f2IiEv1VIT_ENS2_1UE
template void f2<int>(V<int>, int);
namespace NS {
template <typename T> struct S1 {};
template<typename T> void ft3(S1<T>, S1<char>) { }
// CHECK: @_ZN2NS3ft3IiEEvNS_2S1IT_EENS1_IcEE
template void ft3<int>(S1<int>, S1<char>);
}