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 | 6732d350efa53cadd99259cbb6a72a695e4504dd (patch) | |
tree | 6ac4f13b8f806be93b69ce97e32a3b2fd8ff4c89 /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 633bf93fb897b7117c95540464398691248503be (diff) | |
download | bcm5719-llvm-6732d350efa53cadd99259cbb6a72a695e4504dd.tar.gz bcm5719-llvm-6732d350efa53cadd99259cbb6a72a695e4504dd.zip |
[-cxx-abi microsoft] Also spill the argument-back-references context when mangling templates
llvm-svn: 168862
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index d91f5125387..afb8bf88444 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/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 |