1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[MS Demangler] Properly demangle anonymous namespaces.

llvm-svn: 340237
This commit is contained in:
Zachary Turner 2018-08-20 23:58:35 +00:00
parent b3722ff8de
commit 41eec7abf4
2 changed files with 9 additions and 5 deletions

View File

@ -2165,11 +2165,13 @@ Name *Demangler::demangleAnonymousNamespaceName(StringView &MangledName) {
Name *Node = Arena.alloc<Name>();
Node->Str = "`anonymous namespace'";
if (MangledName.consumeFront('@'))
return Node;
Error = true;
return nullptr;
size_t EndPos = MangledName.find('@');
if (EndPos == StringView::npos) {
Error = true;
return nullptr;
}
MangledName = MangledName.substr(EndPos + 1);
return Node;
}
Name *Demangler::demangleLocallyScopedNamePiece(StringView &MangledName) {

View File

@ -228,3 +228,5 @@
??_V@YAXPEAXAEAVklass@@@Z
; CHECK: void __cdecl operator delete[](void *, class klass &)
; ?A@?A0x43583946@@3VB@@B
class B const `anonymous namespace'::A