[llvm] r340238 - [MS Demangler] Anonymous namespace hashes can be backreferenced.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 16:58:58 PDT 2018
Author: zturner
Date: Mon Aug 20 16:58:58 2018
New Revision: 340238
URL: http://llvm.org/viewvc/llvm-project?rev=340238&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
llvm/trunk/test/Demangle/ms-back-references.test
Modified: llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp?rev=340238&r1=340237&r2=340238&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp Mon Aug 20 16:58:58 2018
@@ -2170,6 +2170,8 @@ Name *Demangler::demangleAnonymousNamesp
Error = true;
return nullptr;
}
+ StringView NamespaceKey = MangledName.substr(0, EndPos);
+ memorizeString(NamespaceKey);
MangledName = MangledName.substr(EndPos + 1);
return Node;
}
Modified: llvm/trunk/test/Demangle/ms-back-references.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Demangle/ms-back-references.test?rev=340238&r1=340237&r2=340238&view=diff
==============================================================================
--- llvm/trunk/test/Demangle/ms-back-references.test (original)
+++ llvm/trunk/test/Demangle/ms-back-references.test Mon Aug 20 16:58:58 2018
@@ -166,3 +166,6 @@
??$fun_tmpl_recurse at H$1?ident at fn_space@@YA?AURetVal at 2@H at Z@fn_space@@YA?AURetVal at 0@H at Z
; CHECK: struct fn_space::RetVal __cdecl fn_space::fun_tmpl_recurse<int, &struct fn_space::RetVal __cdecl fn_space::ident(int)>(int)
+
+?AddEmitPasses at EmitAssemblyHelper@?A0x43583946@@AEAA_NAEAVPassManager at legacy@llvm@@W4BackendAction at clang@@AEAVraw_pwrite_stream at 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 *)
More information about the llvm-commits
mailing list