diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2012-06-26 22:29:50 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2012-06-26 22:29:50 +0000 |
commit | 4285f84a5c3725210b4f12551af6c5d467d0763d (patch) | |
tree | deae1a095850463c28d3dc12a1891dc0bd019c42 /lib/AST/MicrosoftMangle.cpp | |
parent | 92c4fd5c17a5fd433cca7ddecb0ad4a104baa59c (diff) |
[Windows] Improve mangling of templates when back references are present
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 0d42689833..37c654d666 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -706,8 +706,15 @@ void MicrosoftCXXNameMangler::mangleTemplateInstantiationName( // <template-name> ::= <unscoped-template-name> <template-args> // ::= <substitution> // Always start with the unqualified name. + + // Templates have their own context for back references. + BackRefMap TemplateContext; + NameBackReferences.swap(TemplateContext); + mangleUnscopedTemplateName(TD); mangleTemplateArgs(TemplateArgs); + + NameBackReferences.swap(TemplateContext); } void |