From: Anders Carlsson Date: Sat, 26 Sep 2009 22:18:22 +0000 (+0000) Subject: Handle substitutions in mangleTemplatePrefix. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aeb85374e92619b8e4ce92ac6e30756b5053a137;p=clang Handle substitutions in mangleTemplatePrefix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82879 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index c07d9039c0..3db736b7b4 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -531,10 +531,15 @@ void CXXNameMangler::mangleTemplatePrefix(const TemplateDecl *ND) { // ::= // ::= - // FIXME: and + if (mangleSubstitution(ND)) + return; + + // FIXME: manglePrefix(ND->getDeclContext()); mangleUnqualifiedName(ND->getTemplatedDecl()); + + addSubstitution(ND); } void diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index eb6267bb6e..fffd4569b4 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -162,8 +162,7 @@ namespace NS { template bool operator==(const A&, const A&) { return true; } } -// FIXME: This should be _ZN2NSeqIcEEbRK1AIT_ES5_ -// CHECK: @_ZN2NSeqIcEEbRK1AIT_ES4_ +// CHECK: @_ZN2NSeqIcEEbRK1AIT_ES5_ template bool NS::operator==(const ::A&, const ::A&); namespace std {