[cfe-commits] r82262 - /cfe/trunk/lib/CodeGen/Mangle.cpp
Anders Carlsson
andersca at mac.com
Fri Sep 18 12:44:50 PDT 2009
Author: andersca
Date: Fri Sep 18 14:44:50 2009
New Revision: 82262
URL: http://llvm.org/viewvc/llvm-project?rev=82262&view=rev
Log:
Make the mangler conform even better to the grammar.
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=82262&r1=82261&r2=82262&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Fri Sep 18 14:44:50 2009
@@ -262,8 +262,13 @@
}
}
- // FIXME: Check if we have a class template.
-
+ // Check if we have a class template.
+ if (const ClassTemplateSpecializationDecl *Spec =
+ dyn_cast<ClassTemplateSpecializationDecl>(ND)) {
+ TemplateArgs = &Spec->getTemplateArgs();
+ return Spec;
+ }
+
return 0;
}
@@ -507,16 +512,7 @@
return;
manglePrefix(DC->getParent());
-
- if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(DC))
- mangleSourceName(Namespace->getIdentifier());
- else if (const RecordDecl *Record = dyn_cast<RecordDecl>(DC)) {
- if (const ClassTemplateSpecializationDecl *D =
- dyn_cast<ClassTemplateSpecializationDecl>(Record)) {
- mangleType(QualType(D->getTypeForDecl(), 0));
- } else
- mangleSourceName(Record->getIdentifier());
- }
+ mangleUnqualifiedName(cast<NamedDecl>(DC));
addSubstitution(cast<NamedDecl>(DC));
}
More information about the cfe-commits
mailing list