Call mangleTemplatePrefix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82247 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index e6c3f1b..685bb6d 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -82,7 +82,7 @@
const TemplateArgument *TemplateArgs,
unsigned NumTemplateArgs);
void manglePrefix(const DeclContext *DC);
- void mangleTemplatePrefix(const DeclContext *DC);
+ void mangleTemplatePrefix(const NamedDecl *ND);
void mangleOperatorName(OverloadedOperatorKind OO, unsigned Arity);
void mangleCVQualifiers(unsigned Quals);
void mangleType(QualType T);
@@ -448,9 +448,7 @@
const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND);
if (FD && FD->getPrimaryTemplate()) {
- // FIXME: Call mangleTemplatePrefix.
- manglePrefix(FD->getDeclContext());
- mangleUnqualifiedName(FD);
+ mangleTemplatePrefix(FD);
mangleTemplateArgumentList(*FD->getTemplateSpecializationArgs());
} else {
manglePrefix(ND->getDeclContext());
@@ -509,11 +507,15 @@
addSubstitution(cast<NamedDecl>(DC));
}
-void CXXNameMangler::mangleTemplatePrefix(const DeclContext *DC) {
+void CXXNameMangler::mangleTemplatePrefix(const NamedDecl *ND) {
// <template-prefix> ::= <prefix> <template unqualified-name>
// ::= <template-param>
// ::= <substitution>
+ // FIXME: <substitution> and <template-param>
+
+ manglePrefix(ND->getDeclContext());
+ mangleUnqualifiedName(ND);
// FIXME: Implement!
}