[MS Demangler] Anonymous namespace hashes can be backreferenced.

Previously we were not remembering the key values of anonymous
namespaces, but we need to do this.

llvm-svn: 340238
This commit is contained in:
Zachary Turner 2018-08-20 23:58:58 +00:00
parent 91c98a858c
commit 0002dd467d
2 changed files with 5 additions and 0 deletions

View File

@ -2170,6 +2170,8 @@ Name *Demangler::demangleAnonymousNamespaceName(StringView &MangledName) {
Error = true;
return nullptr;
}
StringView NamespaceKey = MangledName.substr(0, EndPos);
memorizeString(NamespaceKey);
MangledName = MangledName.substr(EndPos + 1);
return Node;
}

View File

@ -166,3 +166,6 @@
??$fun_tmpl_recurse@H$1?ident@fn_space@@YA?AURetVal@2@H@Z@fn_space@@YA?AURetVal@0@H@Z
; CHECK: struct fn_space::RetVal __cdecl fn_space::fun_tmpl_recurse<int, &struct fn_space::RetVal __cdecl fn_space::ident(int)>(int)
?AddEmitPasses@EmitAssemblyHelper@?A0x43583946@@AEAA_NAEAVPassManager@legacy@llvm@@W4BackendAction@clang@@AEAVraw_pwrite_stream@5@PEAV85@@Z
; CHECK: bool __cdecl `anonymous namespace'::EmitAssemblyHelper::AddEmitPasses(class llvm::legacy::PassManager &, enum clang::BackendAction, class llvm::raw_pwrite_stream &, class llvm::raw_pwrite_stream *)