[cfe-commits] r82247 - /cfe/trunk/lib/CodeGen/Mangle.cpp

Anders Carlsson andersca at mac.com
Fri Sep 18 11:47:07 PDT 2009


Author: andersca
Date: Fri Sep 18 13:47:07 2009
New Revision: 82247

URL: http://llvm.org/viewvc/llvm-project?rev=82247&view=rev
Log:
Call mangleTemplatePrefix.

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=82247&r1=82246&r2=82247&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Fri Sep 18 13:47:07 2009
@@ -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!
 }
 





More information about the cfe-commits mailing list