summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2012-11-29 08:58:47 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2012-11-29 08:58:47 +0000
commit6732d350efa53cadd99259cbb6a72a695e4504dd (patch)
tree6ac4f13b8f806be93b69ce97e32a3b2fd8ff4c89 /clang/lib/AST/MicrosoftMangle.cpp
parent633bf93fb897b7117c95540464398691248503be (diff)
downloadbcm5719-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.cpp10
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
OpenPOWER on IntegriCloud