[cfe-commits] r82871 - /cfe/trunk/lib/CodeGen/Mangle.cpp
Anders Carlsson
andersca at mac.com
Sat Sep 26 12:45:45 PDT 2009
Author: andersca
Date: Sat Sep 26 14:45:45 2009
New Revision: 82871
URL: http://llvm.org/viewvc/llvm-project?rev=82871&view=rev
Log:
mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=82871&r1=82870&r2=82871&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Sat Sep 26 14:45:45 2009
@@ -74,7 +74,7 @@
unsigned NumTemplateArgs);
void mangleUnqualifiedName(const NamedDecl *ND);
void mangleUnscopedName(const NamedDecl *ND);
- void mangleUnscopedTemplateName(const NamedDecl *ND);
+ void mangleUnscopedTemplateName(const TemplateDecl *ND);
void mangleSourceName(const IdentifierInfo *II);
void mangleLocalName(const NamedDecl *ND);
void mangleNestedName(const NamedDecl *ND);
@@ -82,7 +82,7 @@
const TemplateArgument *TemplateArgs,
unsigned NumTemplateArgs);
void manglePrefix(const DeclContext *DC);
- void mangleTemplatePrefix(const NamedDecl *ND);
+ void mangleTemplatePrefix(const TemplateDecl *ND);
void mangleOperatorName(OverloadedOperatorKind OO, unsigned Arity);
void mangleQualifiers(Qualifiers Quals);
void mangleType(QualType T);
@@ -285,7 +285,7 @@
if (DC->isTranslationUnit() || isStdNamespace(DC)) {
// Check if we have a template.
const TemplateArgumentList *TemplateArgs = 0;
- if (const NamedDecl *TD = isTemplate(ND, TemplateArgs)) {
+ if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
mangleUnscopedTemplateName(TD);
mangleTemplateArgumentList(*TemplateArgs);
return;
@@ -313,7 +313,7 @@
}
if (DC->isTranslationUnit() || isStdNamespace(DC)) {
- mangleUnscopedTemplateName(cast<NamedDecl>(TD->getTemplatedDecl()));
+ mangleUnscopedTemplateName(TD);
mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
} else {
mangleNestedName(TD, TemplateArgs, NumTemplateArgs);
@@ -329,7 +329,7 @@
mangleUnqualifiedName(ND);
}
-void CXXNameMangler::mangleUnscopedTemplateName(const NamedDecl *ND) {
+void CXXNameMangler::mangleUnscopedTemplateName(const TemplateDecl *ND) {
// <unscoped-template-name> ::= <unscoped-name>
// ::= <substitution>
if (mangleSubstitution(ND))
@@ -463,7 +463,7 @@
// Check if we have a template.
const TemplateArgumentList *TemplateArgs = 0;
- if (const NamedDecl *TD = isTemplate(ND, TemplateArgs)) {
+ if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
mangleTemplatePrefix(TD);
mangleTemplateArgumentList(*TemplateArgs);
} else {
@@ -478,7 +478,7 @@
unsigned NumTemplateArgs) {
Out << 'N';
manglePrefix(TD->getDeclContext());
- mangleUnqualifiedName(TD->getTemplatedDecl());
+ mangleUnqualifiedName(TD);
mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
Out << 'E';
@@ -513,7 +513,7 @@
// Check if we have a template.
const TemplateArgumentList *TemplateArgs = 0;
- if (const NamedDecl *TD = isTemplate(cast<NamedDecl>(DC), TemplateArgs)) {
+ if (const TemplateDecl *TD = isTemplate(cast<NamedDecl>(DC), TemplateArgs)) {
mangleTemplatePrefix(TD);
mangleTemplateArgumentList(*TemplateArgs);
} else {
@@ -524,7 +524,7 @@
addSubstitution(cast<NamedDecl>(DC));
}
-void CXXNameMangler::mangleTemplatePrefix(const NamedDecl *ND) {
+void CXXNameMangler::mangleTemplatePrefix(const TemplateDecl *ND) {
// <template-prefix> ::= <prefix> <template unqualified-name>
// ::= <template-param>
// ::= <substitution>
@@ -533,7 +533,6 @@
manglePrefix(ND->getDeclContext());
mangleUnqualifiedName(ND);
- // FIXME: Implement!
}
void
More information about the cfe-commits
mailing list