diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2012-11-29 08:58:47 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2012-11-29 08:58:47 +0000 |
commit | 53c61c5c0c912b5032882471f5215d66a11bb0ce (patch) | |
tree | 5438b6cbe7d41c969c9213772c605a62da19c0ba /lib/AST/MicrosoftMangle.cpp | |
parent | 84268904947ada7e251932a6f5b0f4364df7a2c7 (diff) |
[-cxx-abi microsoft] Also spill the argument-back-references context when mangling templates
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index d91f512538..afb8bf8844 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -742,13 +742,17 @@ void MicrosoftCXXNameMangler::mangleTemplateInstantiationName( // Always start with the unqualified name. // Templates have their own context for back references. - BackRefMap TemplateContext; - NameBackReferences.swap(TemplateContext); + ArgBackRefMap OuterArgsContext; + BackRefMap OuterTemplateContext; + NameBackReferences.swap(OuterTemplateContext); + TypeBackReferences.swap(OuterArgsContext); mangleUnscopedTemplateName(TD); mangleTemplateArgs(TemplateArgs); - NameBackReferences.swap(TemplateContext); + // Restore the previous back reference contexts. + NameBackReferences.swap(OuterTemplateContext); + TypeBackReferences.swap(OuterArgsContext); } void |