diff options
author | John McCall <rjmccall@apple.com> | 2011-07-01 02:19:08 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-07-01 02:19:08 +0000 |
commit | 35ee32e800145a535f2676898f8f06f7ae6e9b43 (patch) | |
tree | e312343bd4ccc17aa83366e8f86f2df3c2aa049e /lib/AST/ItaniumMangle.cpp | |
parent | 561f81243f665cf2001caadc45df505f826b72d6 (diff) |
Just mangle substituted template parameter types as unresolved types.
This is kindof questionable but seems to do more-or-less the right thing.
This is not a particularly friendly part of the ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ItaniumMangle.cpp')
-rw-r--r-- | lib/AST/ItaniumMangle.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp index 205e887fea..9d9cc3ed4f 100644 --- a/lib/AST/ItaniumMangle.cpp +++ b/lib/AST/ItaniumMangle.cpp @@ -818,28 +818,21 @@ void CXXNameMangler::mangleUnresolvedPrefix(NestedNameSpecifier *qualifier, case Type::Decltype: case Type::TemplateTypeParm: case Type::UnaryTransform: + case Type::SubstTemplateTypeParm: unresolvedType: assert(!qualifier->getPrefix()); // We only get here recursively if we're followed by identifiers. if (recursive) Out << 'N'; - // This seems to do everything we want. + // This seems to do everything we want. It's not really + // sanctioned for a substituted template parameter, though. mangleType(QualType(type, 0)); // We never want to print 'E' directly after an unresolved-type, // so we return directly. return; - // Substituted template type parameters should only come up with - // enclosing templates. - // <unresolved-type> ::= <existing-substitution> [ <template-args> ] - case Type::SubstTemplateTypeParm: { - if (recursive) Out << 'N'; - mangleExistingSubstitution(QualType(type, 0)); - return; - } - case Type::Typedef: mangleSourceName(cast<TypedefType>(type)->getDecl()->getIdentifier()); break; |